From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mason Harding <mason.harding@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow SQL lookup due to every field being listed in SORT KEY
Date: Fri, 10 Sep 2010 22:03:37 -0400
Message-ID: <20100911020337.GH26232@tamriel.snowman.net> (raw)
In-Reply-To: <5323.1284170438@sss.pgh.pa.us>
References: <AANLkTinQu1vhokjuAZDd3d2b6oeSqERF4biNGP-k-6UV@mail.gmail.com>
<5323.1284170438@sss.pgh.pa.us>
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> The reason it's sorting by all the columns is the DISTINCT
You might also verify that you actually need/*should* have the DISTINCT,
if it's included today.. Often developers put that in without
understanding why they're getting dups (which can often be due to
missing pieces from the JOIN clause or misunderstanding of the database
schema...).
Stephen
Attachments:
signature.asc (application/pgp-signature, 196B) download
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: sfrost@snowman.net, tgl@sss.pgh.pa.us, mason.harding@gmail.com
Subject: Re: Slow SQL lookup due to every field being listed in SORT KEY
In-Reply-To: <20100911020337.GH26232@tamriel.snowman.net>
* 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