pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: JDBC Driver for Postgres. I add a little cache for al less lot
2+ messages / 2 participants
[nested] [flat]
* Re: JDBC Driver for Postgres. I add a little cache for al less lot
@ 2006-07-06 02:01 Kris Jurka <jurka@ejurka.com>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2006-07-06 02:01 UTC (permalink / raw)
To: Sebastien DIAZ <sebastien.diaz@gmail.com>; +Cc: 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@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.
Kris Jurka
Attachments:
cache.patch.gz (application/gzip, 5.5K) download
^ permalink raw reply [nested|flat] 2+ messages in thread
* JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request
@ 2006-07-06 07:43 Sebastien DIAZ <sebastien.diaz@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Sebastien DIAZ @ 2006-07-06 07:43 UTC (permalink / raw)
To: 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
Attachments:
cache.patch.gz (application/x-gzip, 5.5K) download
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-07-06 07:43 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-06 02:01 Re: JDBC Driver for Postgres. I add a little cache for al less lot Kris Jurka <jurka@ejurka.com>
2006-07-06 07:43 JDBC Driver for Postgres. I add a little cache for al less lot of Metadata request Sebastien DIAZ <sebastien.diaz@gmail.com>
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