[postgis-devel] Gist index not used with Multipolygons

Chris Hodgson chodgson at refractions.net
Thu Oct 11 18:04:37 PDT 2007


What Mark said is correct. If a large enough proportion of the 
multi-polygons in the table are expected to overlap your query box 
(based on the statistics for the table), then it is actually faster to 
to a sequence scan than an index scan. If the number of multi-polygons 
in the table is small enough, then it doesn't matter what query box you 
give it, this will always be the case.

If you are still wondering why the second query is slower, if it is 
using a supposedly faster method, then consider the fact that your 
multi-polygons are larger and more complicated and thus take longer to 
to test against each other.

Chris



More information about the postgis-devel mailing list