From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Jim Nasby <jnasby@pervasive.com>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-performance@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [PERFORM] temporary indexes
Date: Wed, 01 Mar 2006 09:35:33 -0600
Message-ID: <44056AE5.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <20060228210232.GW82012@pervasive.com>
References: <44041B68.EE98.0025.0@wicourts.gov>
<16076.1141146348@sss.pgh.pa.us>
<440435BC.EE98.0025.0@wicourts.gov>
<20060228210232.GW82012@pervasive.com>
>>> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, jnasby@pervasive.com, pgsql-hackers@postgresql.org, tgl@sss.pgh.pa.us
Subject: Re: [PERFORM] temporary indexes
In-Reply-To: <44056AE5.EE98.0025.0@wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox