Tom Lane <tgl@sss.pgh.pa.us> writes:
> Greg Stark <gsstark@mit.edu> writes:
> > Are we still going to subtract out the gettimeofday overhead?
>
> > I was always more excited about that than the sampling aspect. I've run into
> > queries where EXPLAIN ANALYZE results were deceptive due to the gettimeofday
> > overhead but I've never run into a query where gettimeofday overhead made
> > running the query under EXPLAIN ANALYZE impractical.
>
> That would be deceptive in a different way, ie, make it look like there
> was a whole bunch of outside-the-plan overhead.
Well that's exactly what there is.
To avoid user confusion it would reasonable to print out a line at the bottom:
Explain analyze profiling overhead removed: xxx ms
That also gives the user feedback on how precise their explain analyze results
are. If they see that the overhead being removed is as large as the timing
remaining then they can realize that the results aren't especially precise. On
the other hand if they see that the overhead being removed is small then they
can be pretty confident in the precision of the results.
--
greg