Skip site navigation (1) Skip section navigation (2)

Re: Picking up strange queries for "pg_catalog"

From: Graham Leggett <minfrin(at)sharp(dot)fm>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Picking up strange queries for "pg_catalog"
Date: 2010-07-07 00:36:50
Message-ID: D394E16B-80F1-4E2E-A2F6-FFD913EBAED2@sharp.fm (view raw or flat)
Thread:
Lists: pgsql-jdbc
On 04 Jul 2010, at 1:25 PM, Thomas Kellerer wrote:

> I don't think it's the driver "making" these calls. Some of them  
> look like they are a result of calling severl JDBC metadata API  
> functions (e.g DatabaseMetaData.getColumns() or something similar)  
> which in turn are not initiated by the driver, but by the client  
> software. So I would suspect the transaction manager or your ORM  
> library to make those calls (and thus generating the queries)

I have managed to isolate at least one of the strange queries to a  
call to the "getColumnTypeName()" method on the following object:

org.postgresql.jdbc3.Jdbc3ResultSetMetaData

The debugger catches what I think are internal fields inside the above  
object called "schemaNameCache" and "tableNameCache", both of which  
are null.

In theory it looks like the Jdbc3ResultSetMetaData object is firing  
off database queries on calls to metadata methods over and over again.

Am I on the right track, and if so, is there a way to get the JDBC  
driver's org.postgresql.jdbc3.Jdbc3ResultSetMetaData object to cache  
these calls so that they aren't as expensive?

Regards,
Graham
--


In response to

pgsql-jdbc by date

Next:From: Bryan MontgomeryDate: 2010-07-08 20:26:21
Subject: Trying to accomplish SSO from Windows
Previous:From: LewDate: 2010-07-06 23:10:43
Subject: Re: Interpretability with xDBC specification

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group