Re: How much expensive are row level statistics?

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: How much expensive are row level statistics?
Дата
Msg-id 20051213010751.GA63416@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: How much expensive are row level statistics?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How much expensive are row level statistics?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Mon, Dec 12, 2005 at 06:01:01PM -0500, Tom Lane wrote:
> 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.

Now there goes Tom with his skeptical eye again, and here comes me
saying "oops" again.  Further tests show that for this application
the killer is stats_command_string, not stats_block_level or
stats_row_level.  Here are timings for the same set of operations
(thousands of insert, update, and delete statements in one transaction)
run under various settings:

stats_command_string = off
stats_block_level = off
stats_row_level = off
time: 2:09.46

stats_command_string = off
stats_block_level = on
stats_row_level = off
time: 2:12.28

stats_command_string = off
stats_block_level = on
stats_row_level = on
time: 2:14.38

stats_command_string = on
stats_block_level = off
stats_row_level = off
time: 2:50.58

stats_command_string = on
stats_block_level = on
stats_row_level = on
time: 2:53.76

[Wanders off, swearing that he ran these tests before and saw higher
penalties for block- and row-level statistics.]

--
Michael Fuhr

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

Предыдущее
От: "J. Andrew Rogers"
Дата:
Сообщение: Re: opinion on disk speed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How much expensive are row level statistics?