| От | Bruce Momjian |
|---|---|
| Тема | Re: [HACKERS] using a btree index in order by clause? |
| Дата | |
| Msg-id | 199806171044.GAA18849@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | using a btree index in order by clause? (t-ishii@sra.co.jp) |
| Список | pgsql-hackers |
> > Hi, > > I'm wondering if we can use btree index to sort the results in a > certain condition. The idea is, if the order-items in the order by > clause have a btree index, then why we need to sort them again? > > I'm starting to look at the executor code. However this kind of > "optimization" might be better to be done in the optimizer, I don't > know. FYI, often, using an index to sort a tables is SLOWER than loading all the rows into psort and sorting them, because the index causes random seeks all over the table. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера