On Fri, 2009-07-10 at 01:36 +0100, Greg Stark wrote: > Arguably the missing feature here is skip-scans where we scan the > index but only pull out one record for each distinct value. I'm not > sure there's anything particularly stopping Postgres from being able > to do them, but it might be a lot of code for a narrow use case. Hypothetically, would something like a "sort distinct" operator be of any use? I wonder how much work it would save if the sort could save steps by weeding out duplicate tuples while sorting. That might make sort into a better plan in cases where don't have a good estimate of the distinct values. Regards, Jeff Davis -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general