From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: PREPARE and GUC plan_cache_mode |
Date: | 2019-09-30 16:05:07 |
Message-ID: | 13155.1569859507@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Our current docs have this text for PREPARE:
> Prepared statements can use generic plans rather than re-planning
> with each set of supplied EXECUTE values. This occurs immediately
> for prepared statements with no parameters; otherwise it occurs
> only after five or more executions produce plans whose estimated
> cost average (including planning overhead) is more expensive than
> the generic plan cost estimate. Once a generic plan is chosen, it
> is used for the remaining lifetime of the prepared statement. Using
> EXECUTE values which are rare in columns with many duplicates can
> generate custom plans that are so much cheaper than the generic
> plan, even after adding planning overhead, that the generic plan
> might never be used.
> There is no mention that PG 12's plan_cache_mode can modify this
> behavior. I think this needs a doc patch.
Yeah, agreed. I can do it, or do you want to?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2019-09-30 16:47:34 | Re: PREPARE and GUC plan_cache_mode |
Previous Message | Bruce Momjian | 2019-09-30 15:55:05 | PREPARE and GUC plan_cache_mode |