Skip site navigation (1) Skip section navigation (2)

Re: BUG #6513: explain (analyze, buffers) and toasted fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: maxim(dot)boguk(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6513: explain (analyze, buffers) and toasted fields
Date: 2012-03-12 15:23:44
Message-ID: 27251.1331565824@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Robert HaasDate: 2012-03-12 15:32:46
Subject: Re: BUG #6517: Volatile function erroneously optimized, does not consider change in schema path
Previous:From: Tom LaneDate: 2012-03-12 15:16:18
Subject: Re: BUG #6517: Volatile function erroneously optimized, does not consider change in schema path

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group