Search Postgresql Archives

Re: Custom function ROWS hint ignored due to inlining?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Philip Semanchuk <philip@xxxxxxxxxxxxxxxxxxxxx> 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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux