pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: László Hornyák <kocka.public@gmail.com>
To: List <pgsql-jdbc@postgresql.org>
Subject: Fwd: Caching driver on pgFoundry?
Date: Fri, 7 Sep 2007 15:56:55 +0200
Message-ID: <809bf8d30709070656q39ffc0fcp8eae7f0ded2d2039@mail.gmail.com> (raw)
In-Reply-To: <809bf8d30709070655j2458a13q64cb228ee0c172b2@mail.gmail.com>
References: <200709050825.27080.josh@agliodbs.com>
	<200709050937.29027.josh@agliodbs.com>
	<Pine.BSO.4.64.0709051313050.30413@leary.csoft.net>
	<8FD2948B-9513-4611-9310-908CA253EECD@fastcrypt.com>
	<Pine.BSO.4.64.0709051404440.13924@leary.csoft.net>
	<46DF0F70.50802@enterprisedb.com>
	<1189156640.4175.464.camel@ebony.site>
	<30775804-224A-4807-BDDD-5ACB9A173BCA@fastcrypt.com>
	<46E14E80.9030409@opencloud.com>
	<809bf8d30709070655j2458a13q64cb228ee0c172b2@mail.gmail.com>

Sorry, I wanted to send this to the list...

---------- Forwarded message ----------
From: László Hornyák <kocka.public@gmail.com>
Date: 07-Sep-2007 15:55
Subject: Re: [JDBC] Caching driver on pgFoundry?
To: Oliver Jowett <oliver@opencloud.com>

Hi!

On 07/09/07, Oliver Jowett <oliver@opencloud.com> wrote:
>
>
>
> What is the implementation advantage of making statement pooling part of
> the main driver? There are maintenance issues which count *against* it
> being part of the driver so you need to provide a good reason to include
> it.


There are two main reasons I can mention:
- JDBC 4 allows prepared statement pooling (Which is optional, the driver
can ignore the programs request to cache the prepared statement, and I
believe it enables some kind of early optimization for those who like to do
early optimizations. But that is just my opinion, but JDBC 4 specification
expects drivers to deal with it. Time will tell, maybe data access layers
like hibernate or JPA implementations in the future will use it) see
http://java.sun.com/javase/6/docs/api/java/sql/Statement.html#setPoolable%28boolean%29
- Clients that do not use DataSource, but only DriverManager can gain
significant speed improvement. Now, you get prepapred statement caching if
the wrapper ( e.g. DBCP) gives it, not if you use a pg connection directly.

Packaging issues are IMO fairly irrelevant because if you must give a
> single package to your users, you can always take the base driver and a
> separate pooling wrapper, package them together, and say "Hey look here
> is the statement-pooling postgresql JDBC driver".


Yes, any developer can do that, but it would probably save some time for
developers if they wouldn't have to.


-O
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>



-- 
László Hornyák

-- 
László Hornyák

view thread (50+ messages)  latest in thread

Message-ID: <809bf8d30709070656q39ffc0fcp8eae7f0ded2d2039@mail.gmail.com>
Permalink:  ../809bf8d30709070656q39ffc0fcp8eae7f0ded2d2039@mail.gmail.com/
Also on:    postgresql.org/message-id/809bf8d30709070656q39ffc0fcp8eae7f0ded2d2039@mail.gmail.com

 · 

reply

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: kocka.public@gmail.com
  Subject: Re: Fwd: Caching driver on pgFoundry?
  In-Reply-To: <809bf8d30709070656q39ffc0fcp8eae7f0ded2d2039@mail.gmail.com>
  References: <200709050825.27080.josh@agliodbs.com> <200709050937.29027.josh@agliodbs.com> <Pine.BSO.4.64.0709051313050.30413@leary.csoft.net> <8FD2948B-9513-4611-9310-908CA253EECD@fastcrypt.com> <Pine.BSO.4.64.0709051404440.13924@leary.csoft.net> <46DF0F70.50802@enterprisedb.com> <1189156640.4175.464.camel@ebony.site> <30775804-224A-4807-BDDD-5ACB9A173BCA@fastcrypt.com> <46E14E80.9030409@opencloud.com> <809bf8d30709070655j2458a13q64cb228ee0c172b2@mail.gmail.com> <809bf8d30709070656q39ffc0fcp8eae7f0ded2d2039@mail.gmail.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