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

Re: Prepared statements, parameters and logging

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Prepared statements, parameters and logging
Date: 2007-06-26 09:25:32
Message-ID: 1182849932.13328.107.camel@coppola.muc.ecircle.de (view raw or flat)
Thread:
Lists: pgsql-jdbc
Oliver,

Now this was enlightening... now I finally understand the behavior I
see.

> If you set prepareThreshold=0 then an unnamed statement should always be 
> used (& therefore actual parameter values should be taken into account 
> when planning), with one exception: the setFetchSize() case I described 
> in my earlier email.

The setFetchSize must be the cause I see the unnamed statements (I have
it automatically added to all of our select statements). For a query
with limit on it (the case of my problem-query), the fetch size is not
very useful, I'll get rid of it...

> If you set logLevel=2 on the driver, you should be able to see the 
> differences in the protocol flow in more detail than the server logging 
> lets you see.

Thanks for the tip, I'll do that too next time... for the current
situation your explanation is more then enough.

Thanks,
Csaba.



In response to

pgsql-jdbc by date

Next:From: Bojan SkaljacDate: 2007-06-27 07:39:54
Subject: New update for Serbian translation
Previous:From: Oliver JowettDate: 2007-06-26 09:10:58
Subject: Re: Prepared statements, parameters and logging

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