[postgis-users] Bad estimate from index on points

Paul Ramsey pramsey at boundlessgeo.com
Sun Nov 3 20:28:07 PST 2013

It's 20 times better, but still under-determined.



 Aggregate  (cost=465.08..465.09 rows=1 width=8) (actual
time=24.997..24.997 rows=1 loops=1)

   ->  Nested Loop  (cost=5.26..404.94 rows=24055 width=8) (actual
time=2.575..19.113 rows=6832 loops=1)

         ->  Seq Scan on polygon  (cost=0.00..4.25 rows=1 width=128)
(actual time=0.033..0.054 rows=1 loops=1)

               Filter: (polygon_id = 50)

               Rows Removed by Filter: 99

         ->  Bitmap Heap Scan on point  (cost=5.26..400.36 rows=33
width=56) (actual time=2.537..17.729 rows=6832 loops=1)

               Recheck Cond: (polygon.geom && geom)

               Filter: _st_contains(polygon.geom, geom)

               ->  Bitmap Index Scan on point_index  (cost=0.00..5.25
rows=99 width=0) (actual time=2.480..2.480 rows=6832 loops=1)

                     Index Cond: (polygon.geom && geom)

 Total runtime: 25.096 ms


On Sun, Nov 3, 2013 at 7:59 PM, BladeOfLight16 <bladeoflight16 at gmail.com> wrote:
> On Sun, Nov 3, 2013 at 10:12 PM, Paul Ramsey <pramsey at boundlessgeo.com>
> wrote:
>> Coming back to this a bit late (hah!) ... what PostGIS version is this on?
> 2.0.4. Haven't tested with 2.1 yet, but I think it persists. There's a nice
> script in my original report to test with if you have 2.1 installed. =) It
> needs a VACUUM ANALYZE FULL; at the end, though.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

More information about the postgis-users mailing list