pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: PostgreSQL-documentation <pgsql-docs@postgresql.org>
Subject: Re: PREPARE and GUC plan_cache_mode
Date: Mon, 30 Sep 2019 12:05:07 -0400
Message-ID: <13155.1569859507@sss.pgh.pa.us> (raw)
In-Reply-To: <20190930155505.GA21095@momjian.us>
References: <20190930155505.GA21095@momjian.us>

Bruce Momjian <bruce@momjian.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





view thread (4+ messages)  latest in thread

Message-ID: <13155.1569859507@sss.pgh.pa.us>
Permalink:  ../13155.1569859507@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13155.1569859507@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us
  Subject: Re: PREPARE and GUC plan_cache_mode
  In-Reply-To: <13155.1569859507@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox