| From: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Cached plans and statement generalization |
| Date: | 2017-05-25 15:54:45 |
| Message-ID: | 283dfb96-48c2-1a87-90ab-97ca87b237fe@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 10.05.2017 19:11, Konstantin Knizhnik wrote:
>
> Based on the Robert's feedback and Tom's proposal I have implemented
> two new versions of autoprepare patch.
>
> First version is just refactoring of my original implementation: I
> have extracted common code into prepare_cached_plan and
> exec_prepared_plan
> function to avoid code duplication. Also I rewrote assignment of
> values to parameters. Now types of parameters are inferred from types
> of literals, so there may be several
> prepared plans which are different only by types of parameters. Due to
> the problem with type coercion for parameters, I have to catch errors
> in parse_analyze_varparams.
>
Attached please find rebased version of the autoprepare patch based on
Tom's proposal (perform analyze for tree with constant literals and then
replace them with parameters).
Also I submitted this patch for the Autum commitfest.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
| Attachment | Content-Type | Size |
|---|---|---|
| autoprepare.patch | text/x-patch | 42.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Janes | 2017-05-25 16:12:08 | CREATE STATISTICS statistic_type documentation |
| Previous Message | Petr Jelinek | 2017-05-25 15:52:50 | Walsender timeouts and large transactions |