Skip site navigation (1) Skip section navigation (2)

Re: Slow SQL lookup due to every field being listed inSORT KEY

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mason Harding <mason(dot)harding(at)gmail(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow SQL lookup due to every field being listed inSORT KEY
Date: 2010-09-11 02:03:37
Message-ID: 20100911020337.GH26232@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-performance
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

pgsql-performance by date

Next:From: azajacDate: 2010-09-12 17:34:00
Subject: Problem with mergejoin performance (some bug?)
Previous:From: Tom LaneDate: 2010-09-11 02:00:38
Subject: Re: Slow SQL lookup due to every field being listed in SORT KEY

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group