Re: Can the V7.3 EXPLAIN ANALYZE be trusted?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
Дата
Msg-id 17152.1107729965@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Can the V7.3 EXPLAIN ANALYZE be trusted?  ("Leeuw van der, Tim" <tim.leeuwvander@nl.unisys.com>)
Ответы Re: Can the V7.3 EXPLAIN ANALYZE be trusted?  (Steven Rosenstein <srosenst@us.ibm.com>)
Список pgsql-performance
> From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org]On Behalf Of Steven
Rosenstein
> >> I don't think EXPLAIN ANALYZE puts that much overhead on a query.

I think you're being overly optimistic.  The explain shows that the
Materialize subnode is being entered upwards of 32 million times:

   ->  Materialize  (cost=505.06..511.38 rows=632 width=4) (actual time=0.00..0.02 rows=43 loops=752066)

43 * 752066 = 32338838.  The instrumentation overhead is basically two
gettimeofday() kernel calls per node entry.  Doing the math shows that
your machine is able to do gettimeofday() in about half a microsecond,
which isn't stellar but it's not all that slow for a kernel call.
(What's the platform here, anyway?)  Nonetheless it's a couple of times
larger than the actual time needed to pull a row from a materialized
array ...

The real answer to your question is "IN (subselect) sucks before PG 7.4;
get a newer release".

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: PostgreSQL clustering VS MySQL clustering