Re: Question on a select

Поиск
Список
Период
Сортировка
От Pierre-Frédéric Caillaud
Тема Re: Question on a select
Дата
Msg-id opsjzfejkwcq72hf@musicbox
обсуждение исходный текст
Ответ на Re: Question on a select  (Madison Kelly <linux@alteeve.com>)
Список pgsql-general

>    I didn't realize that the order made a difference. A sign of how much
> learning I need to do. :p For reference, I think 'file_parent_dir' and
> 'fs_parent_dir' are the most important because I do an 'ORDER BY
> [fs|file]_parent_dir ASC' on most queries. I've made the changes, thank
> you again!

    If you SELECT ... WHERE condition on A order by B :

an index on A will be used, but an index on B won't

    If you SELECT ... WHERE condition on A order by A, B :

an index on A,B will be used because it will give the rows in already
sorted order

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

Предыдущее
От: "C. Duncan Hudson"
Дата:
Сообщение: Shared Sequences?
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Shared Sequences?