Re: Add min and max execute statement time in pg_stat_statement

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Add min and max execute statement time in pg_stat_statement
Дата
Msg-id 20131023233432.GR2706@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Add min and max execute statement time in pg_stat_statement  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: Add min and max execute statement time in pg_stat_statement  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
* Peter Geoghegan (pg@heroku.com) wrote:
> On Wed, Oct 23, 2013 at 4:14 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> > The last bucket would be limited to 8ms < x <= 16 ms.  If you find something
> >> 16ms, then you have to rescale *before* you increment any of the buckets.
> > Once you do, there is now room to hold it.
>
> How is that laid out in shared memory? If the answer is an array of 32
> int64s, one per bucket, -1 from me to this proposal. A huge advantage
> of pg_stat_statements today is that the overhead is actually fairly
> modest. I really want to preserve that property.

Any chance we could accumulate into the histogram in local memory and
only push to the shared memory on an "infrequent" or at least "less
frequent" basis?  Apologies, I've not looked into the pg_stat_statements
bits all that closely, but I can certainly see how having to hold it all
in shared memory with locking to update would be painful..
Thanks,
    Stephen

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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Add min and max execute statement time in pg_stat_statement
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Add min and max execute statement time in pg_stat_statement