| От | Matteo Beccati |
|---|---|
| Тема | Re: ORDER BY and LIMIT not propagated on inherited |
| Дата | |
| Msg-id | 43186922.4060703@beccati.com обсуждение исходный текст |
| Ответ на | Re: ORDER BY and LIMIT not propagated on inherited (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: ORDER BY and LIMIT not propagated on inherited
|
| Список | pgsql-performance |
Hi, >>The correct strategy IMHO would >>be applying the order by and limit for each child table (which results >>in an index scan, if possible), appending, then finally sorting a bunch >>of rows, and limiting again. > > This would be a win in some cases, and in many others a loss (ie, wasted > sort steps). The hard part is determining when to apply it. I don't actually know how many smaller separate sorts compare to a single big sort, but I guess the difference wouldn't be so big if the LIMIT is low. Add to this that you don't need to append the whole rowsets, but just smaller ones. Best regards -- Matteo Beccati http://phpadsnew.com http://phppgads.com
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера