JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request

From: "Sebastien DIAZ" <sebastien(dot)diaz(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request
Date: 2006-07-06 07:43:05
Message-ID: 2a2b6a3d0607060043i452d7c10v1f776850287bd443@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Yann PICHOT 2006-07-06 13:17:08 Re: Fwd: Diffrence between 8.0.3 and 8.1.3
Previous Message Kris Jurka 2006-07-06 02:01:34 Re: JDBC Driver for Postgres. I add a little cache for al less lot