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

From Kevin Grittner
Subject Re: BUG #5997: [queryplan] PostgreSQL is sorting the query results when the result can only be 1 item.
Date
Msg-id 4DBAA5F1020000250003D061@gw.wicourts.gov
Whole thread Raw
In response to BUG #5997: [queryplan] PostgreSQL is sorting the query results when the result can only be 1 item.  ("Michiel" <michiel@ict4schools.nl>)
List pgsql-bugs
"Michiel" <michiel@ict4schools.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

pgsql-bugs by date:

Previous
From: "Mark Reid"
Date:
Subject: BUG #5998: CLUSTER and "ERROR: missing chunk number 0 for toast value"
Next
From: Tom Lane
Date:
Subject: Re: BUG #5998: CLUSTER and "ERROR: missing chunk number 0 for toast value"