Re: Why does explain differ from explan analyze? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why does explain differ from explan analyze?
Date
Msg-id 444.1165434502@sss.pgh.pa.us
Whole thread Raw
In response to Why does explain differ from explan analyze?  (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>)
Responses Re: Why does explain differ from explan analyze?  (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>)
List pgsql-general
Joost Kraaijeveld <J.Kraaijeveld@Askesis.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

pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Speed of postgres compared to ms sql, is this
Next
From: "Michael Guyver"
Date:
Subject: Re: Concatenate performance question