From: Sebastien DIAZ <sebastien.diaz@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request
Date: Thu, 6 Jul 2006 09:43:05 +0200
Message-ID: <2a2b6a3d0607060043i452d7c10v1f776850287bd443@mail.gmail.com> (raw)
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
Attachments:
cache.patch.gz (application/x-gzip, 5.5K) download
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: sebastien.diaz@gmail.com
Subject: Re: JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request
In-Reply-To: <2a2b6a3d0607060043i452d7c10v1f776850287bd443@mail.gmail.com>
References: <2a2b6a3d0607060043i452d7c10v1f776850287bd443@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