From: Markus Schaber <schabios@logi-track.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Re: raising the default prepareTheshold
Date: Tue, 21 Sep 2004 10:09:48 +0200
Message-ID: <20040921100948.052b6ead@kingfisher.intern.logi-track.com> (raw)
In-Reply-To: <414CA8A0.7070707@opencloud.com>
References: <414CA8A0.7070707@opencloud.com>
Hi, Oliver,
On Sun, 19 Sep 2004 09:29:04 +1200
Oliver Jowett <oliver@opencloud.com> wrote:
> However, with a 8.0 backend, if the planner benefits from knowing the
> particular parameter values in use for a particular query, then using an
> unnamed statement may be faster due to using an improved plan. Under 7.4
> there will be no difference; both named and unnamed statements will use
> the generic plan.
Quoting from http://developer.postgresql.org/beta-history.txt:
* Plan prepared queries only when first executed so constants can be
used for statistics (Oliver Jowett)
Prepared statements plan queries once and execute them many times.
While prepared queries avoid the overhead of re-planning on each
use, the quality of the plan suffers from not knowing the exact
parameters to be used in the query. In this release, planning of
unnamed prepared statements is delayed until the first execution,
and the actual parameter values of that execution are used as
optimization hints.
So it seems that your issue is addressed in 8.0 - as long as the Beta of
the Readme is correct :-)
HTH,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: schabios@logi-track.com, oliver@opencloud.com
Subject: Re: raising the default prepareTheshold
In-Reply-To: <20040921100948.052b6ead@kingfisher.intern.logi-track.com>
References: <414CA8A0.7070707@opencloud.com> <20040921100948.052b6ead@kingfisher.intern.logi-track.com>
* 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