Re: 7.3 schedule - Mailing list pgsql-hackers

From Barry Lind
Subject Re: 7.3 schedule
Date
Msg-id 3CB6454D.1070705@xythos.com
Whole thread Raw
In response to Re: 7.3 schedule  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: 7.3 schedule
List pgsql-hackers
Neil Conway wrote:
> I would suggest using it any time you're executing the same query
> plan a large number of times. In my experience, this is very common.
> There are already hooks for this in many client interfaces: e.g.
> PrepareableStatement in JDBC and $dbh->prepare() in Perl DBI.

I'm not sure that JDBC would use this feature directly.  When a 
PreparableStatement is created in JDBC there is nothing that indicates 
how many times this statement is going to be used.  Many (most IMHO) 
will be used only once.  As I stated previously, this feature is only 
useful if you are going to end up using the PreparedStatement multiple 
times.  If it only is used once, it will actually perform worse than 
without the feature (since you need to issue two sql statements to the 
backend to accomplish what you were doing in one before).

Thus if someone wanted to use this functionality from jdbc they would 
need to do it manually, i.e. issue the prepare and execute statements 
manually instead of the jdbc driver doing it automatically for them.

thanks,
--Barry

PS.  I actually do believe that the proposed functionality is good and 
should be added (even though it may sound from the tone of my emails in 
this thread that that isn't the case :-)  I just want to make sure that 
everyone understands that this doesn't solve the whole problem.  And 
that more work needs to be done either in 7.3 or some future release. 
My fear is that everyone will view this work as being good enough such 
that the rest of the issues won't be addressed anytime soon.  I only 
wish I was able to work on some of this myself, but I don't have the 
skills to hack on the backend too much.  (However if someone really 
wanted a new feature in the jdbc driver in exchange, I'd be more than 
happy to help)



pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: numeric/decimal docs bug?
Next
From: Joe Conway
Date:
Subject: Re: help with bison