| From: | Victor Dobrovolsky <booby(dot)stager(at)gmail(dot)com> |
|---|---|
| To: | Ron <ronljohnsonjr(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: right way of using case-expressions in plpgsql functions |
| Date: | 2023-10-15 21:54:22 |
| Message-ID: | CAJFsatNMKPztXwmdwOdkdzrAsUvU78bakE4cwS7D2n92bE6U3A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thank you. I'll take it.
пн, 16 окт. 2023 г. в 00:20, Ron <ronljohnsonjr(at)gmail(dot)com>:
> 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.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thiemo Kellner | 2023-10-16 07:51:44 | Purely declarative FKs |
| Previous Message | Victor Dobrovolsky | 2023-10-15 21:53:14 | Re: right way of using case-expressions in plpgsql functions |