Re: BUG #6513: explain (analyze, buffers) and toasted fields - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6513: explain (analyze, buffers) and toasted fields
Date
Msg-id 27251.1331565824@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6513: explain (analyze, buffers) and toasted fields  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: BUG #6513: explain (analyze, buffers) and toasted fields  (Marti Raudsepp <marti@juffo.org>)
List pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> ... I think that if there's an actual bug here, it's that
> EXPLAIN ANALYZE is skipping the formation of the actual output tuples,
> and therefore it's doing less work than an actual execution of the
> real query would.  I am not sure whether it would be a good idea to
> change that or not.

EXPLAIN ANALYZE *necessarily* does less work than the real query,
because it doesn't transmit the results to the client (which is going
to be a dominant cost in a lot of situations).  I'm not sure whether
running the I/O functions would provide a useful improvement in
verisimilitude or not; but one should never imagine that EXPLAIN is an
exact simulation of normal query execution.  It's meant for debugging
planner choices, anyway, and the detoast&I/O costs are going to be the
same whichever plan you choose.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6517: Volatile function erroneously optimized, does not consider change in schema path
Next
From: Robert Haas
Date:
Subject: Re: BUG #6517: Volatile function erroneously optimized, does not consider change in schema path