From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Where does the time go? |
Date: | 2006-03-25 17:38:26 |
Message-ID: | 1143308306.24487.1052.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Sat, 2006-03-25 at 16:24 +0100, Martijn van Oosterhout wrote:
> I agree. However, if it's the overhead of calling gettimeofday() that
> slows everything down, perhaps we should tackle that end. For example,
> have a sampling mode that only times say 5% of the executed nodes.
>
> EXPLAIN ANALYZE SAMPLE blah;
I like this idea. Why not do this all the time? I'd say we don't need
the SAMPLE clause at all, just do this for all EXPLAIN ANALYZEs.
> And then in InstrStart have a quick test that skips the gettimeofday
> for this interation sometimes. You'd probably need some heuristics
> because you always want to catch the first iteration but after the
> 10,000th tuple in an indexscan, you're probably not going to learn
> anything new.
> How does this sound?
Something even simpler? First 40 plus 5% random sample after that? I'd
prefer a random sample so we have the highest level of trust in the
numbers produced. Otherwise we might accidentally introduce bias from
systematic effects such as nested loops queries speeding up towards the
end of their run. (I know we would do that at the start, but we are
stuck because we don't know the population size ahead of time and we
know we need a reasonable number of data points).
Best Regards, Simon Riggs
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2006-03-25 17:50:30 | Re: Role incompatibilities |
Previous Message | Peter Eisentraut | 2006-03-25 17:36:34 | Re: Role incompatibilities |
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-03-25 17:55:26 | Re: Where does the time go? |
Previous Message | Martijn van Oosterhout | 2006-03-25 15:45:37 | Re: Where does the time go? |