Re: Slow SQL lookup due to every field being listed in SORT KEY - Mailing list pgsql-performance

From Stephen Frost
Subject Re: Slow SQL lookup due to every field being listed in SORT KEY
Date
Msg-id 20100911020337.GH26232@tamriel.snowman.net
Whole thread Raw
In response to Re: Slow SQL lookup due to every field being listed in SORT KEY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Slow SQL lookup due to every field being listed in SORT KEY  (Mason Harding <mason.harding@gmail.com>)
List pgsql-performance
* 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

Attachment

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Slow SQL lookup due to every field being listed in SORT KEY
Next
From:
Date:
Subject: Problem with mergejoin performance