Re: General DB Tuning - Mailing list pgsql-performance

From Mark Rae
Subject Re: General DB Tuning
Date
Msg-id 20050713100740.GA27912@purplebat.com
Whole thread Raw
In response to Re: General DB Tuning  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-performance
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 know if it's been fixed...

It's not in 8.0.3, but I was having the same problems with DBD::Pg so
I backported some of it and also changed the code so that it listed the
values of the bind parameters, so you get something like

LOG:  statement: SELECT sr.name,sr.seq_region_id, sr.length, 1 FROM seq_region sr  WHERE sr.name = $1 AND
sr.coord_system_id= $2 
LOG:  binding: "dbdpg_2" with 2 parameters
LOG:  bind "dbdpg_2" $1 = "20"
LOG:  bind "dbdpg_2" $2 = "1"
LOG:  statement: EXECUTE   [PREPARE:  SELECT sr.name,sr.seq_region_id, sr.length, 1 FROM seq_region sr  WHERE sr.name =
$1AND sr.coord_system_id = $2] 
LOG:  duration: 0.164 ms

I've attached a patch in case anyone finds it useful.

    -Mark

Attachment

pgsql-performance by date:

Previous
From: Nicolas Beaume
Date:
Subject: large table vs multiple smal tables
Next
From: Nicolas Beaume
Date:
Subject: (pas de sujet)