Re: That EXPLAIN ANALYZE patch still needs work

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: That EXPLAIN ANALYZE patch still needs work
Дата
Msg-id 20060607151712.GC23587@svana.org
обсуждение исходный текст
Ответ на Re: That EXPLAIN ANALYZE patch still needs work  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: That EXPLAIN ANALYZE patch still needs work  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: That EXPLAIN ANALYZE patch still needs work  (Greg Stark <gsstark@mit.edu>)
Re: That EXPLAIN ANALYZE patch still needs work  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 07, 2006 at 09:53:32AM -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > Do we agree the idea can't go further? What next?
>
> It still needs investigation; I'm no longer convinced that the TLB-flush
> theory is correct.  See rest of thread.  We may well have to revert the
> current patch, but I'd like to be sure we understand why.

One thing I'm thinking of trying is to, instead of assuming we can
estimate the duractions of all the nodes by taking the total time
divided by samples. we assume that the duration of tuple X is similar
in duration to tuple X+1 but not necessarily the same as all other
tuples.

This moves the calculation from EndLoop to StopInstr. Basically in
StopInstr you do the steps:

if( sampling )
{ x = get time for this tuple n = number of tuples skipped
 cumulativetime += x*n
}

This would mean that we wouldn't be assuming that tuples near the end
take as long as tuples near the beginning. Except we're now dealing
will smaller numbers, so I'm worried about error accumlation.

> If we do have to revert, I'd propose that we pursue the notion of
> interrupt-driven sampling like gprof uses.

How would that work? You could then estimate how much time was spent in
each node, but you no longer have any idea about when they were entered
or left.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: Connection Broken with Custom Dicts for TSearch2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: That EXPLAIN ANALYZE patch still needs work