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

Re: BUG #5997: [queryplan] PostgreSQL is sorting the query results when the result can only be 1 item.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Michiel" <michiel(at)ict4schools(dot)nl>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5997: [queryplan] PostgreSQL is sorting the query results when the result can only be 1 item.
Date: 2011-04-29 16:50:09
Message-ID: 4DBAA5F1020000250003D061@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
"Michiel" <michiel(at)ict4schools(dot)nl> wrote:
 
> [query with ORDER BY clause]
 
> [plan which spends 0.039 ms sorting one row]
 
> What i see and expect:
> 
> I see that the query is sorted. But the result is max 1 item.
 
This is not a bug; it is a feature request for the planner.
 
If you see a way that a query can be reliably analyzed to determine
that the sort can be omitted which takes less than the 0.039 ms
required for the sort step, please suggest it.  But not on the bugs
list.
 
-Kevin

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-04-29 17:14:53
Subject: Re: BUG #5998: CLUSTER and "ERROR: missing chunk number 0 for toast value"
Previous:From: BrianDate: 2011-04-29 16:22:34
Subject: BUG #5999: Postgresql using Excel 2010 Powerpivot

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