1 message in org.postgresql.pgsql-jdbcJDBC Driver for Postgres. I add a lit...
FromSent OnAttachments
Sebastien DIAZJul 6, 2006 12:42 am.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:JDBC Driver for Postgres. I add a little cache for al less lot of Metadata requestActions...
From:Sebastien DIAZ (seba@gmail.com)
Date:Jul 6, 2006 12:42:42 am
List:org.postgresql.pgsql-jdbc
Attachments:
cache.patch.gz - 7k

Hello

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.

I add a cache manager in the cache directory org/postgresql/cache/CacheManager.java org/postgresql/cache/PropertyCacheManager.java and I change this file org/postgresql/core/Field.java org/postgresql/Driver.java org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java org/postgresql/jdbc2/TypeInfoCache.java

I send a diff of my code

Thanks for your help to enhance the driver