Re: Explain's estimation differs from real count enormously

From: "Sergey Konoplev" <gray(dot)ru(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Explain's estimation differs from real count enormously
Date: 2008-10-23 12:29:21
Message-ID: c3a7de1f0810230529s3cdbaa21ha293013dbdf89dcb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> EXPLAIN ANALYZE of the query shows strange estimated rows count:
>
> EXPLAIN ANALYZE SELECT * FROM objonmap
> WHERE 1=1
> AND box(om_point, om_point) <@ box(point(-55.97398205077, -100),
> point(82.166446008477, 180))
> AND (om_flag OR om_ref_id IN (69000001071, 69000001513,
> 69000001092, 69000001091))
> AND om_state = 1;
>

One more thing - removing condition "AND box(om_point, om_point) <@
box(point(-55.97398205077, -100), point(82.166446008477, 180))" leads
to good (right) estimation.

BTW, pg 8.3.3 behave the same.

--
Regards,
Sergey Konoplev
--
PostgreSQL articles in english & russian
http://gray-hemp.blogspot.com/search/label/postgresql/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Guettler 2008-10-23 12:44:20 Re: Shopping cart
Previous Message Mikkel Hgh 2008-10-23 12:20:49 Re: Database design for separate tsearch table