| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера