Re: General DB Tuning

Поиск
Список
Период
Сортировка
От Mark Rae
Тема Re: General DB Tuning
Дата
Msg-id 20050713100740.GA27912@purplebat.com
обсуждение исходный текст
Ответ на Re: General DB Tuning  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список 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

Вложения

В списке pgsql-performance по дате отправления:

Предыдущее
От: Nicolas Beaume
Дата:
Сообщение: large table vs multiple smal tables
Следующее
От: Nicolas Beaume
Дата:
Сообщение: (pas de sujet)