Re: Query performance question on a large table - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Query performance question on a large table
Date
Msg-id 20040107174307.GC12631@wolff.to
Whole thread Raw
In response to Re: Query performance question on a large table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Jan 07, 2004 at 02:31:22 -0500,
  Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I just a couple days ago added some logic to CVS tip to notice that the
> sub-select has a DISTINCT clause, and not add unnecessary unique-ifying
> processing on top of it.  So in 7.5, writing a DISTINCT clause will
> amount to forcing a particular query plan, which might or might not be
> the best thing but hopefully won't be too terrible.  But in 7.4 it has
> nothing to recommend it ...

Can't the DISTINCT be dropped if there isn't a LIMIT clause?
Similarly UNION, INTERSECTION and EXCEPT could also also be changed
to the ALL forms if there isn't a LIMIT.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: deadlocks - sharelocks on transactions
Next
From: Ericson Smith
Date:
Subject: 64 Bit Postgresql ports