Re: [PERFORM] temporary indexes - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: [PERFORM] temporary indexes
Date
Msg-id 44056AE5.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: [PERFORM] temporary indexes  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
>>> On Tue, Feb 28, 2006 at  3:02 pm, in message
<20060228210232.GW82012@pervasive.com>, "Jim C. Nasby"
<jnasby@pervasive.com>
wrote:
>
> Maybe it's just the way my twisted mind thinks, but I generally
prefer
> using a JOIN when possible...

Definitely.  But sometimes you don't want one row from a table for each
qualifying row in another table, you want one row from the table if one
or more qualifying rows exist in the other table.  Those are the cases
in question here.  Don't suggest that I just let the duplicates happen
and use DISTINCT, that is much more prone to logic errors in complex
queries, and typically optimizes worse.

-Kevin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [ADMIN] Reg:lo_open error..pls help me
Next
From: Tom Lane
Date:
Subject: Re: Automatic free space map filling