Re: Prepared statements, parameters and logging

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Prepared statements, parameters and logging
Дата
Msg-id 46803CB0.2000009@opencloud.com
обсуждение исходный текст
Ответ на Re: Prepared statements, parameters and logging  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-jdbc
Csaba Nagy wrote:

(before:)

> duration: 5437.499 ms  statement: EXECUTE <unnamed>  [PREPARE:  SELECT
> ... ]

(after:)

> duration: 2200.570 ms  statement: EXECUTE C_220047  [PREPARE:  SELECT
> ... ]

Also.. as to why you see the behaviour change, I'd guess that you're
using log_min_duration and the plans for the queries where you are using
setFetchSize() have changed from one with low startup cost to one with
high startup cost due to switching from named to unnamed statements. The
high startup cost plan means the very first portal execution takes
longer and gets logged.. the low startup cost plan might be more
expensive overall but the cost is spread out across all the portal
executions, so no one execution takes long enough to get logged.

-O

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Prepared statements, parameters and logging
Следующее
От: "Bady, Brant RBCM:EX"
Дата:
Сообщение: Can MD5 sums be posted for the downloadable files?