Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: sequential scan on select distinct - Mailing list pgsql-performance

Greg Stark <[email protected]> writes:
> why isn't a "skip index scan" plan available? Well, nobody's written the code
> yet.

I don't really think it would be a useful plan anyway.  What *would* be
useful is to support HashAggregate as an implementation alternative for
DISTINCT --- currently I believe we only consider that for GROUP BY.
The DISTINCT planning code is fairly old and crufty and hasn't been
redesigned lately.

            regards, tom lane

pgsql-performance by date:

Previous
From: Greg Stark
Date:
Subject: Re: Comparing user attributes with bitwise operators
Next
From: Greg Stark
Date:
Subject: Re: sequential scan on select distinct