| От | Ron Mayer |
|---|---|
| Тема | Re: half the query time in an unnecessary(?) sort? |
| Дата | |
| Msg-id | 426DD595.1040608@cheapcomplexdevices.com обсуждение исходный текст |
| Ответ на | Re: half the query time in an unnecessary(?) sort? (Josh Berkus <josh@agliodbs.com>) |
| Список | pgsql-performance |
Josh Berkus wrote: [quoted out of order] >Ron, > > Looking at your analyze, though, I think it's not the sort that's taking the > time as it is that the full sorted entity_id column won't fit in work_mem. > Try increasing it? Yup, that indeed fixed this particular query since neither table was particularly large. > It still has to sort because the clustering isn't guarenteed to be 100%. I guess I was contemplating whether or not there are some conditions where it could be 100% (perhaps combined with Hannu's read only table speculation). > However, such sorts should be very quick as they have little work to do. True, so long as the table can fit in work-mem. For much larger tables IMHO it'd be nice to be able to simply do a seq-scan on them if there were some way of knowing that they were sorted.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера