Re: How much expensive are row level statistics?

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: <pgsql-performance(at)postgresql(dot)org>, "Carlos Benkendorf" <carlosbenkendorf(at)yahoo(dot)com(dot)br>
Subject: Re: How much expensive are row level statistics?
Date: 2005-12-12 18:33:27
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3417DDAC9@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-performance

>
> On Sun, Dec 11, 2005 at 11:53:36AM +0000, Carlos Benkendorf wrote:
> > I would like to use autovacuum but is not too much expensive
> > collecting row level statistics?
>
> 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. Since my apps inherited this behavior from their
COBOL legacy, I keep them off. If your app follows the monolithic query
approach to problem solving (pull lots of rows in, edit them on the
client, and send them back), penalty is basically zero.

Merlin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-12-12 18:34:45 Re: missing something obvious about intervals?
Previous Message Volkan YAZICI 2005-12-12 18:24:09 Re: missing something obvious about intervals?

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Fuhr 2005-12-12 18:50:16 Re: How much expensive are row level statistics?
Previous Message Tony S 2005-12-12 16:18:53 Re: BUG #2108: Function with OUT parameters not recognized,

Browse pgsql-performance by date

  From Date Subject
Next Message Vivek Khera 2005-12-12 18:42:43 Re: opinion on disk speed
Previous Message Luke Lonergan 2005-12-12 18:30:03 Re: Should Oracle outperform PostgreSQL on a complex