Re: Stats collector performance improvement

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Stats collector performance improvement
Date: 2006-01-03 16:35:56
Message-ID: 20060103163556.GH82560@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-performance

On Tue, Jan 03, 2006 at 09:40:53AM +0000, Simon Riggs wrote:
> On Mon, 2006-01-02 at 16:48 -0500, Tom Lane wrote:
> We can also save lots of cycles on the current statement overhead, which
> is currently the worst part of the stats, performance-wise. That
> definitely needs redesign. AFAICS we only ever need to know the SQL
> statement via the stats system if the statement has been running for
> more than a few minutes - the main use case is for an admin to be able
> to diagnose a rogue or hung statement. Pushing the statement to stats
> every time is just a big overhead. That suggests we should either have a
> pull or a deferred push (longer-than-X-secs) approach.

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.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-03 16:38:52 Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and
Previous Message Tom Lane 2006-01-03 16:29:02 Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-01-03 16:43:23 Re: Stats collector performance improvement
Previous Message Simon Riggs 2006-01-03 09:54:57 Re: Stats collector performance improvement

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2006-01-03 16:43:23 Re: Stats collector performance improvement
Previous Message Tom Lane 2006-01-03 15:43:34 Re: Materialize Subplan and push into inner index conditions