Re: Difference between explain analyze and real execution time

From: Tobias Brox <tobixen(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Artur Zając <azajac(at)ang(dot)com(dot)pl>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Difference between explain analyze and real execution time
Date: 2010-11-15 15:25:18
Message-ID: AANLkTikS9iNgDB651S4x7FZHRqo_GSQ_1dbjX+3RRYg_@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

[Tom Lane]
> EXPLAIN ANALYZE doesn't account for all of the runtime involved.  In
> this case, I'd bet that session startup/shutdown is a big part of the
> difference.

The session startup/shutdown should be the same for the real SQL and
the broken SQL, shouldn't it?

[Artur Zając]
> time psql -c 'explain analyze SELECT te.idt FROM t_positions AS te
> JOIN t_st AS stm ON (te.idt=stm.idt AND 4=stm.idm) WHERE te.idtr IN
> (347186)'

Is this weidness only observed for this query? What happens with
other queries? "explain analyze select 1"? "explain analyze select *
from t_positions where idtr=347816"? plain select without "explain
analyze"? etc?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andy Colson 2010-11-15 19:27:43 Re: Running PostgreSQL as fast as possible no matter the consequences
Previous Message Artur Zając 2010-11-15 15:24:30 Re: Difference between explain analyze and real execution time