Re: Why does explain differ from explan analyze?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why does explain differ from explan analyze?
Date: 2006-12-06 19:48:22
Message-ID: 444.1165434502@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> writes:
> I have a query that if I do "explain" shows an other plan than if I do
> "explain analyze" with that same query (immediately after the explain).

Really? What PG version is this? Can you provide a self-contained
test case?

> Does it have to do something with vacuum?

In theory an autovacuum happening between the two steps could update the
statistics and cause the plan to change, but if it's repeatable then
that hardly seems like the explanation.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Guyver 2006-12-06 19:56:46 Re: Concatenate performance question
Previous Message Scott Ribe 2006-12-06 19:13:04 Re: Speed of postgres compared to ms sql, is this