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

From Tom Lane
Subject Re: sequential scan on select distinct
Date
Msg-id 29194.1097091506@sss.pgh.pa.us
Whole thread Raw
In response to Re: sequential scan on select distinct  (Greg Stark <gsstark@mit.edu>)
Responses Re: sequential scan on select distinct  (Greg Stark <gsstark@mit.edu>)
Re: sequential scan on select distinct  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
List pgsql-performance
Greg Stark <gsstark@mit.edu> 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