Re: Add min and max execute statement time in pg_stat_statement

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Add min and max execute statement time in pg_stat_statement
Дата
Msg-id CAM3SWZTDsnP3y1YfF7QaW1BwyBxVPdxuxMV6OdjNFwaz3gUCMw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add min and max execute statement time in pg_stat_statement  (Mitsumasa KONDO <kondo.mitsumasa@gmail.com>)
Ответы Re: Add min and max execute statement time in pg_stat_statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jan 31, 2014 at 5:07 AM, Mitsumasa KONDO
<kondo.mitsumasa@gmail.com> wrote:
> And past result shows that your patch's most weak point is that deleting
> most old statement
> and inserting new old statement cost is very high, as you know.

No, there is no reason to imagine that entry_dealloc() is any slower,
really. There will perhaps be some additional contention with shared
lockers, but that isn't likely to be a major aspect. When the hash
table is full, in reality at that point it's very unlikely that there
will be two simultaneous sessions that need to create a new entry. As
I said, on many of the systems I work with it takes weeks to see a new
entry. This will be especially true now that the *.max default is
5,000.

> It accelerate to affect
> update(delete and insert) cost in pg_stat_statements table. So you proposed
> new setting
> 10k in default max value. But it is not essential solution, because it is
> also good perfomance
>  for old pg_stat_statements.

I was merely pointing out that that would totally change the outcome
of your very artificial test-case. Decreasing the number of statements
to 5,000 would too. I don't think we should assign much weight to any
test case where the large majority or all statistics are wrong
afterwards, due to there being so much churn.


-- 
Peter Geoghegan



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Insert result does not match record count
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Recovery inconsistencies, standby much larger than primary