| От | Jim Nasby |
|---|---|
| Тема | [HACKERS] Split conditions on relations |
| Дата | |
| Msg-id | 1add3cd0-75a9-61d9-2856-cc529bad0e16@openscg.com обсуждение |
| Список | pgsql-hackers |
I've got a customer that is running a pretty expensive function as part of a WHERE clause. With or without the function, the table the function references is the inner-most of a series of nested loops. Without the function things are very fast, but adding the function increases the cost of the index scan on that table by a factor of ~80x. It also falsely skews the row estimate further down, causing a bad shift to materialization in another part of the query, but that's a different problem. Wrapping the majority of the query in an OFFSET 0 with the function call on the outside makes things fast again. It'd be nice if function execution could be delayed to a higher level of a query based on the cost. -- Jim Nasby, Chief Data Architect, OpenSCG http://OpenSCG.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера