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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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