Re: Optimizing DISTINCT with LIMIT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: tmp <skrald(at)amossen(dot)dk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizing DISTINCT with LIMIT
Date: 2008-12-08 16:26:15
Message-ID: 27036.1228753575@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> But I can also see Tom's reluctance. It's a fair increase in the amount of
> code to maintain in that file for a pretty narrow use case. On the other hand
> it looks like it would be all in that file. The planner wouldn't have to do
> anything special to set it up which is nice.

No, the planner would have to be changed to be aware of the behavioral
difference. Otherwise it might pick some other plan besides the one
that has the performance advantage.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-08 16:56:06 Re: benchmarking the query planner (was Re: Simple postgresql.conf wizard)
Previous Message Tom Lane 2008-12-08 16:22:55 Re: Simple postgresql.conf wizard