Re: Stats collector performance improvement

Greg Stark <gsstark@mit.edu>

From: Greg Stark <gsstark@mit.edu>
To: "Jim C. Nasby" <jnasby@pervasive.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Qingqing Zhou <zhouqq@cs.toronto.edu>, pgsql-hackers@postgresql.org
Date: 2006-01-03T23:28:34Z
Lists: pgsql-hackers, pgsql-performance
"Jim C. Nasby" <jnasby@pervasive.com> writes:

> I would argue that minutes is too long, but of course this could be
> user-adjustable. I suspect that even waiting just a second could be a
> huge win, since this only matters if you're executing a lot of
> statements and you won't be doing that if those statements are taking
> more than a second or two to execute.

That's not necessarily true at all. You could just as easily have a
performance problem caused by a quick statement that is being executed many
times as a slow statement that is being executed few times.

That is, you could be executing dozens of queries that take seconds or minutes
once a second but none of those might be the problem. The problem might be the
query that's taking only 300ms that you're executing hundreds of of times a
minute.

Moreover, if you're not gathering stats for queries that are fast then how
will you know whether they're performing properly when you look at them when
they do show up?

-- 
greg