Re: [PERFORM] General DB Tuning

2005-07-13 Thread Simon Riggs
On Wed, 2005-07-13 at 09:52 +0800, Christopher Kings-Lynne wrote: > > Is there a different kind of 'prepared' statements > > that we should be using in the driver to get logging > > to work properly? What is the 'new' protocol? > > The 8.0.2 jdbc driver uses real prepared statements instead of fa

Re: [PERFORM] General DB Tuning

2005-07-13 Thread Mark Rae
On Wed, Jul 13, 2005 at 09:52:20AM +0800, Christopher Kings-Lynne wrote: > The 8.0.2 jdbc driver uses real prepared statements instead of faked > ones. The problem is the new protocol (that the 8.0.2 driver users) has > a bug where protocol-prepared queries don't get logged properly. > I don't k

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Tom Arthurs
Here's the answer for you from the jdbc list: Alvin Hung wrote: Currently, 8.0.2 / JDBC 8.0-310, log_min_duration_statement does not work with JDBC. Nothing will get logged. This makes it very difficult to tune a java application. Can you tell me when will this be fixed? Thanks. This i

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Christopher Kings-Lynne
Is there a different kind of 'prepared' statements that we should be using in the driver to get logging to work properly? What is the 'new' protocol? The 8.0.2 jdbc driver uses real prepared statements instead of faked ones. The problem is the new protocol (that the 8.0.2 driver users) has a

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Brent Henry
We are running Postgres 8.0.2 with the 8.0.2 jdbc driver. And yes we are using prepared statements. I've spent hours trying to get the 'log_min_duration_statement' and 'log_duration' options to work with no luck. I never get any duration from the statement. I also never see 'begin' or 'commit'

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Tom Arthurs
hmm, yea maybe -- we are using the 7.4 driver with 8.0.x db. Dennis wrote: Tom Arthurs wrote: we are using jdbc -- the "log_min_duration_statement = 3000 " statement works fine for me. Looks like there's no other work around for the bug(?). Not sure since I have no interest in logging a mi

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Christopher Kings-Lynne
we are using jdbc -- the "log_min_duration_statement = 3000 " statement works fine for me. Looks like there's no other work around for the bug(?). Not sure since I have no interest in logging a million statements a day, I only want to see the poorly performing hits. Doesn't it depend on wha

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Dennis
Tom Arthurs wrote: we are using jdbc -- the "log_min_duration_statement = 3000 " statement works fine for me. Looks like there's no other work around for the bug(?). Not sure since I have no interest in logging a million statements a day, I only want to see the poorly performing hits. Do

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Tom Arthurs
we are using jdbc -- the "log_min_duration_statement = 3000 " statement works fine for me. Looks like there's no other work around for the bug(?). Not sure since I have no interest in logging a million statements a day, I only want to see the poorly performing hits. Brent Henry wrote: Yes,

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Brent Henry
Yes, that is exactly what I want to use! Unfortunately, it doesn't work if you access postgres through a JDBC connection. I don't know why. I found a posting from back in February which talks aobut this a little: http://archives.postgresql.org/pgsql-admin/2005-02/msg00055.php But I can't find

Re: [PERFORM] General DB Tuning

2005-07-12 Thread Tom Arthurs
I have this in my postgresql.conf file and it works fine (set the min to whatever you want to log) log_min_duration_statement = 3000 # -1 is disabled, in milliseconds. Another setting that might get what you want: #log_duration = false uncomment and change to true. From the docs: (http://www

[PERFORM] General DB Tuning

2005-07-12 Thread Brent Henry
Help! After recently migrating to Postgres 8, I've discovered to my horror that I can't determine which queries are poorly performing anymore because the logging has drastically changed and no longer shows durations for anything done through JDBC. So I'm desperately trying to do performance tunin