1 message in org.postgresql.pgsql-jdbcRe: JDBC Driver for Postgres. I add a...
FromSent OnAttachments
Kris JurkaJul 5, 2006 7:01 pm.gz
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: JDBC Driver for Postgres. I add a little cache for al less lotActions...
From:Kris Jurka (jur@ejurka.com)
Date:Jul 5, 2006 7:01:11 pm
List:org.postgresql.pgsql-jdbc
Attachments:
cache.patch.gz - 7k

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 pgsq@postgresql.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.