Ticket #1410 (closed defect: fixed)
[raster] ST_Intersects doesn't seem to be using index
|Reported by:||robe||Owned by:||pracine|
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.