Thank you. I'll take it.
пн, 16 окт. 2023 г. в 00:20, Ron <ronljohnsonjr@xxxxxxxxx>:
On 10/15/23 11:19, Victor Dobrovolsky wrote:
[snip]
The documentation states that after some executions of such functions the plan should become generic.
What is a generic plan for such a case and how would it work?
It's highly dependent on the query
When I see this happen (after we notice that a procedure starts taking a long time), the query planner flips from a custom plan to a generic plan after about the fifth execution in a session of a function/procedure.
This will make it calculate the plan every time:
set plan_cache_mode = force_custom_plan;
--
Born in Arizona, moved to Babylonia.