[postgis-devel] [PostGIS] #1410: [raster] ST_Intersects doesn't seem to be using index
PostGIS
trac at osgeo.org
Wed Dec 28 08:36:30 PST 2011
#1410: [raster] ST_Intersects doesn't seem to be using index
----------------------------+-----------------------------------------------
Reporter: robe | Owner: pracine
Type: defect | Status: new
Priority: critical | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
I just noticed this recently, but haven't ruled out its not something
wrong with upgrade script.
If I do this:
{{{
SELECT Count(o.rast)
FROM boston_test9 As o INNER JOIN
o_2_boston_test9 AS o2 ON o.rast && o2.rast
WHERE o2.rid = 1;
}}}
I see that my convex hull spatial index is being used.
However if I do:
{{{
SELECT Count(o.rast)
FROM boston_test9 As o INNER JOIN
o_2_boston_test9 AS o2 ON ST_Intersects(o.rast,o2.rast)
WHERE o2.rid = 1;
}}}
My convex hull spatial index is no longer being used.
I thought possibly its the fact that our _ST_Intersects for raster is
really really low (1), but upgrading that to 10000 didn't seem to help the
situation.
Anyrate that cost needs to be set higher as its even lower than our &&
raster_overlaps cost function.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1410>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list