Re: Index usage for sorted query

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Index usage for sorted query
Дата
Msg-id 20041122160115.30cced7b@kingfisher.intern.logi-track.com
обсуждение исходный текст
Ответ на Re: Index usage for sorted query  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
Список pgsql-performance
Hi, Pierre-Frédéric,

On Sat, 20 Nov 2004 17:12:43 +0100
Pierre-Frédéric Caillaud <lists@boutiquenumerique.com> wrote:

> > WHERE cd='ca' ORDER BY l_postcode;
>
> Write :
>
> > WHERE cd='ca' ORDER BY cd, l_postcode;
>
> You have a multicolumn index, so you should specify a multicolumn sort
> exactly the same as your index, and the planner will get it.

Thanks, that seems to help.

Seems weird to order by a column that is all the same value, but well,
why not :-)

Thanks a lot,
Markus


--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com

В списке pgsql-performance по дате отправления:

Предыдущее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: memcached and PostgreSQL
Следующее
От: "Anjan Dave"
Дата:
Сообщение: Re: Query Performance and IOWait