Re: How much expensive are row level statistics?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How much expensive are row level statistics?
Дата
Msg-id 2506.1134428461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How much expensive are row level statistics?  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Ответы Re: How much expensive are row level statistics?  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-performance
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
>> The cost depends on your usage patterns.  I did tests with one of
>> my applications and saw no significant performance difference for
>> simple selects, but a series of insert/update/delete operations ran
>> about 30% slower when block- and row-level statistics were enabled
>> versus when the statistics collector was disabled.

> That approximately confirms my results, except that the penalty may even
> be a little bit higher in the worst-case scenario.  Row level stats hit
> the hardest if you are doing 1 row at a time operations over a
> persistent connection.

IIRC, the only significant cost from enabling stats is the cost of
transmitting the counts to the stats collector, which is a cost
basically paid once at each transaction commit.  So short transactions
will definitely have more overhead than longer ones.  Even for a really
simple transaction, though, 30% seems high --- the stats code is
designed deliberately to minimize the penalty.

            regards, tom lane

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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Joining 2 tables with 300 million rows
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: opinion on disk speed