Re: Index usage for sorted query - Mailing list pgsql-performance

From Tom Lane
Subject Re: Index usage for sorted query
Date
Msg-id 21432.1100969296@sss.pgh.pa.us
Whole thread Raw
In response to Index usage for sorted query  (Markus Schaber <schabios@logi-track.com>)
List pgsql-performance
Markus Schaber <schabios@logi-track.com> writes:
> But as it fetches all the rows through the index, why doesn't it
> recognize that, fetching this way, the rows are already sorted by
> l_postcode?

Tell it to "ORDER BY cd, l_postcode".

> Is Postgresql 8 more intelligend in this case?

No.

            regards, tom lane

pgsql-performance by date:

Previous
From: Pierre-Frédéric Caillaud
Date:
Subject: Re: Index usage for sorted query
Next
From: Josh Berkus
Date:
Subject: Re: tablespace + RAM disk?