Re: JDBC Driver for Postgres. I add a little cache for al less lot

From: Kris Jurka <jurka(at)ejurka(dot)com>
To: Sebastien DIAZ <sebastien(dot)diaz(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC Driver for Postgres. I add a little cache for al less lot
Date: 2006-07-06 02:01:34
Message-ID: 44AC6EFE.8090300@ejurka.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Sebastien DIAZ wrote:
> I use an utilities who use the method isnullable of field too more.
>
> And this methods (and others) call directly Postgres to obtain the
> information.
>
> When I see the log request of postgre I see 1000 request for this and
> 100 request for my apllication
>
>
> This utilities are hibernate and jahia . see the web sites to see that
> is it!
>
> But to enhnance I change the code of the postgre driver. But you
> imagine I use less time to enhance, and the code is certainly not the
> best result of a good reflexion. but it resolve my problem.
> I add a simple cache manager to save the final result (not a resulset)
> of queries and its parameters.
>

Please do not send mail directly to maintainers, but instead please send
it to the pgsql-jdbc(at)postgresql(dot)org mailing list. Also do not send your
entire source tree. Use diff to produce a patch modifying just the
files you've changed as I've attached.

Finally you cannot cache results from different connections. They can
be to different servers, different databases, different usernames.
There is no reason to believe that they should produce the same results.
The utility of a cache on a per connection basis is much more limited
and it seems this is probably something that can be better done at a
higher level than the JDBC driver although unfortunately you don't have
control of that code.

Kris Jurka

Attachment Content-Type Size
cache.patch.gz application/gzip 5.5 KB

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sebastien DIAZ 2006-07-06 07:43:05 JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request
Previous Message Skaljac Bojan 2006-07-05 23:09:52 I have implement set/get stored procedure parameter by name