| From: | Csaba Nagy <nagy(at)ecircle-ag(dot)com> | 
|---|---|
| To: | Dave Cramer <pg(at)fastcrypt(dot)com> | 
| Cc: | Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org> | 
| Subject: | Re: Prepared statements, parameters and logging | 
| Date: | 2007-06-25 13:34:35 | 
| Message-ID: | 1182778475.13328.79.camel@coppola.muc.ecircle.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-jdbc | 
On Mon, 2007-06-25 at 15:11, Dave Cramer wrote:
> I think the text should be specifying that once you exceed  
> preparedThreshold executions the driver uses a named prepared  
> statement, and can re-use it. Otherwise it uses unnamed prepared  
> statements which need to be prepared for each execution.
OK, but I also thought that the value 0 means no reuse at all, i.e. it
should always prepare for each execution... and 1 should mean always
reuse, from the first statement on.
Before I was using prepareThreshold='1', and I was seeing only such
entries in the server log:
duration: 5437.499 ms  statement: EXECUTE <unnamed>  [PREPARE:  SELECT
... ]
Note the <unnamed> in the log entry, it was always there for each
statement.
After setting prepareThreshold='0', I started getting 2 kinds of log
entries, the ones like above, and the likes:
duration: 2200.570 ms  statement: EXECUTE C_220047  [PREPARE:  SELECT
... ]
Note the C_220047, that's what's changed...
I distinctly remember discussing this issue some time ago on this list,
back then I needed the opposite action, to disable the one-time-prepare
by default... now I just need the opposite, to enable it by default even
for repetitive queries... is that possible ?
Cheers,
Csaba.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bady, Brant RBCM:EX | 2007-06-25 16:18:37 | Can MD5 sums be posted for the downloadable files? | 
| Previous Message | Heikki Linnakangas | 2007-06-25 13:20:04 | Re: a simple example of XA (not working) |