Re: v3proto Parse/Bind and the query planner - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: v3proto Parse/Bind and the query planner
Date
Msg-id Pine.BSO.4.56.0405181854380.21058@leary.csoft.net
Whole thread Raw
In response to Re: v3proto Parse/Bind and the query planner  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: v3proto Parse/Bind and the query planner
List pgsql-jdbc

On Wed, 19 May 2004, Oliver Jowett wrote:

> Instead, how about something like:
>
>   - For named statements, plan at Parse time always.
>   - For unnamed statements, plan at Bind time always.
>
> The assumption here is that if the client is using the unnamed
> statement, it's unlikely that it will be repeatedly reusing that
> statement with different parameter values so there is little benefit to
> preserving the query plan at the cost of being unable to plan for
> specific parameter values. If the client is using named statements,
> there's no change in behaviour from the current approach, so presumably
> the client knows what it's doing! :)

I was under the impression that the query protocol would Parse once and
then Bind/Execute for each execution of a statement.  If that's true we
can't use the unnamed portal because it can be destroyed if a
multithreaded app is using two Statements simultaneously.  The lock on
pgstream will be given up between executions of a statement.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: v3proto Parse/Bind and the query planner
Next
From: Oliver Jowett
Date:
Subject: Re: v3proto Parse/Bind and the query planner