Re: Explain's estimation differs from real count enormously - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: Explain's estimation differs from real count enormously
Date
Msg-id c3a7de1f0810230529s3cdbaa21ha293013dbdf89dcb@mail.gmail.com
Whole thread Raw
In response to Explain's estimation differs from real count enormously  ("Sergey Konoplev" <gray.ru@gmail.com>)
List 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/

pgsql-general by date:

Previous
From: Mikkel Høgh
Date:
Subject: Re: Database design for separate tsearch table
Next
From: Thomas Guettler
Date:
Subject: Re: Shopping cart