Re: That EXPLAIN ANALYZE patch still needs work - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: That EXPLAIN ANALYZE patch still needs work
Date
Msg-id 20060607202232.GW45331@pervasive.com
Whole thread Raw
In response to Re: That EXPLAIN ANALYZE patch still needs work  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: That EXPLAIN ANALYZE patch still needs work  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jun 07, 2006 at 11:34:30AM -0400, Tom Lane wrote:
> timer interrupt routine does this once every few milliseconds:

One issue is that on very fast queries, you'd get absolutely no data
this way. A possible solution would be to start with an extremely short
timer interval, and ramp it up if the query runs longer. The downside is
that you'd need to somehow re-scale iterations every time the timer
interval changed. Of course another option is to start off using the
gettimeofday() method and switch to sampling after X seconds, but it'd
be nice if both code paths weren't needed.

> The bubble-up of sample counts to parent nodes could perhaps be done
> while printing the results instead of on-the-fly as sketched above, but
> the above seems simpler.

It'd be nice if there was an option to not aggregate child runtimes to
their parents at all, since it'd make spotting hot spots much easier.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: ADD/DROP INHERITS
Next
From: "Jim C. Nasby"
Date:
Subject: Re: How to avoid transaction ID wrap