| От | Tom Lane |
|---|---|
| Тема | Re: Custom function ROWS hint ignored due to inlining? |
| Дата | |
| Msg-id | 2944321.1666220996@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Custom function ROWS hint ignored due to inlining? (Philip Semanchuk <philip@americanefficient.com>) |
| Список | pgsql-general |
Philip Semanchuk <philip@americanefficient.com> writes:
> I have a custom function where the ROWS hint is getting ignored. I think it’s because the function is getting
inlined,but I’d like a second opinion.
Yeah, I believe you're right about that.
> I would prefer to have the function inlined for better performance, but
> I can declare it VOLATILE if that’s necessary to give decent estimates
> to the planner. Am I correctly reading the situation? If so, is there
> another solution that allows inlining *and* making the ROWS hint visible
> to the planner?
No, but you could experiment with changing the function to plpgsql
instead of SQL. Not sure about the relative performance of those
cases, but it's worth trying it both ways.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера