Re: rw_redis_fdw: SQL Errors when statement is within a function

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: rw_redis_fdw: SQL Errors when statement is within a function
Date: 2018-10-25 21:57:49
Message-ID: 20181025215749.6yy3aparryceuker@squirrel.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

## GPT (gptmailinglists(at)gmail(dot)com):

> So, this kind of switch after a few goes is a normal behavior or
> something unexpected which will change in future?

It's expected, and even documented (when you look at the user-level
interface):
https://www.postgresql.org/docs/current/static/sql-prepare.html
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.

Regards,
Christoph

--
Spare Space.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2018-10-25 22:58:40 Re: Postgresql issue: FATAL: dsa_allocate could not find 7 free pages
Previous Message Bruno Wolff III 2018-10-25 17:43:06 Re: Should pg 11 use a lot more memory building an spgist index?