Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling
Дата
Msg-id 20060509213854.GK29652@svana.org
обсуждение исходный текст
Ответ на Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling  ("Rocco Altier" <RoccoA@Routescape.com>)
Ответы Re: [PATCH] Improve EXPLAIN ANALYZE overhead by
Список pgsql-patches
On Tue, May 09, 2006 at 05:16:57PM -0400, Rocco Altier wrote:
> > - To get this close it needs to get an estimate of the sampling
> > overhead. It does this by a little calibration loop that is run
> > once per backend. If you don't do this, you end up assuming all
> > tuples take the same time as tuples with the overhead, resulting in
> > nodes apparently taking longer than their parent nodes. Incidently,
> > I measured the overhead to be about 3.6us per tuple per node on my
> > (admittedly slightly old) machine.
>
> Could this be deferred until the first explain analyze?  So that we
> aren't paying the overhead of the calibration in all backends, even the
> ones that won't be explaining?

If you look it's only done on the first call to InstrAlloc() which
should be when you run EXPLAIN ANALYZE for the first time.

In any case, the calibration is limited to half a millisecond (that's
500 microseconds), and it'll be a less on fast machines.

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-patches по дате отправления:

Предыдущее
От: "Rocco Altier"
Дата:
Сообщение: Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling
Следующее
От: Qingqing Zhou
Дата:
Сообщение: Re: [HACKERS] Question on win32 semaphore simulation