Re: Explain not accurate - Mailing list pgsql-performance

From Dennis Bjorklund
Subject Re: Explain not accurate
Date
Msg-id Pine.LNX.4.44.0401112050470.13405-100000@zigo.dhs.org
Whole thread Raw
In response to Explain not accurate  (Richard van den Berg <richard.vandenberg@trust-factory.com>)
List pgsql-performance
On Fri, 9 Jan 2004, Richard van den Berg wrote:

> problems. However, I've run into an issue where explain tells us a the
> costs of a quiry are tremendous (105849017586), but the query actually
> runs quite fast. Even "explain analyze" shows these costs.

It would be helpful if you can show the query and the EXPLAIN ANALYZE of
the query (and not just EXPLAIN).

> This makes me wonder: can the estimates explain shows be dead wrong?

Of course they can. An estimation is just an estimation. If you have not
analyzed the database then it's most likely wrong. Dead wrong is not
common, but not impossible.

Run VACUUM ANALYZE and see if the estimate is better after that.

--
/Dennis Björklund


pgsql-performance by date:

Previous
From: Richard van den Berg
Date:
Subject: Explain not accurate
Next
From: Jeff Fitzmyers
Date:
Subject: Re: COUNT & Pagination