Re: Adding getrusage profiling data to EXPLAIN output

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adding getrusage profiling data to EXPLAIN output
Date: 2010-10-04 10:29:43
Message-ID: AANLkTi=YDS6fptRpVuJYQsmM5w7vgpn3YmxWErsRrNM8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 2, 2010 at 3:14 AM, Greg Stark <stark(at)mit(dot)edu> wrote:

> The observed timings are
> query only                 100.5ms
> explain (analyze)         1234.9ms
> explain (analyze,resource) 2210.2ms

It's very large overheads, but I think it is still useful
if there are no overhead if we disable the resource option.

Some random ideas and comments:
* Only top-level rusage might be useful as a replacement for
ancient log_xxx_stats, and should have smaller overhead than
full-spec counters.
* There are some overlaps between the feature and DTrace hooks.
If we need such extension even though we have DTrace hooks,
it might mean DTrace hooks are hard to use for average users
and maybe also for postgres' hackers...
* Some kinds of statistical sampling could solve too much overhead
in stop-watch based algorithm. Sampling is not always accurate,
but it might have better balance between overhead and resolution.

--
Itagaki Takahiro

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-10-04 10:47:21 OUTER keyword
Previous Message Pavel Stehule 2010-10-04 09:58:00 ToDo: enhanced autocomplete for object identified by prefix