Re: statement caching proof of concept

From: till toenges <tt(at)kyon(dot)de>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: statement caching proof of concept
Date: 2006-06-20 00:07:11
Message-ID: 44973C2F.5090701@kyon.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer wrote:
> No question, and I would certainly not make this the default
> behaviour. The user would have to turn on caching.

In this case the user could be expected to close() the statement after
use and not do anything with it afterwards. Therefore you can forget my
part about not knowing when it is safe to reuse the statement.

> How does the generic wrapper solve the problems above ? I would think
> they all suffer from the same problems ?

A generic wrapper would be explicitly used. The user would know how to
use it and comply with any special rules. Implicit caching has to work
with each and every existing app out there, no matter how braindead.
Much more difficult.

The middle road of optional, user configurable caching in the driver can
expect a little more from the user, like properly calling close() and
not doing anything with the statement afterwards. This would have to be
explictly stated in the documentation.

Till

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2006-06-20 09:51:35 Re: statement caching proof of concept
Previous Message Dave Cramer 2006-06-19 23:59:20 Re: statement caching proof of concept