[postgis-users] Strange result about spatial indexes?

Kevin Neufeld kneufeld at refractions.net
Fri Aug 14 09:15:27 PDT 2009

Paragon Corporation wrote:
> Kevin et al,
> Interesting.  What is there to discover? That you can force choice of index?

No, not that you can force the planner.  You'll notice in my 3 examples, the first and the last queries have the exact 
same plan, but the 3rd runs in half the time.

What's interesting here is that postgresql is caching expand() calls differently than a simple &&, improving I/O 
performance significantly.

[time passes]
Ok, so, I just did a bunch more testing on 8.2 and 8.3 and it turns out that I can't reproduce the results on any of the 
newer postgis installs (1.4.0, 1.4.1SVN).  The version I was using to yield the strange caching behaviour was 
(shamefully) 1.1 running on 8.2.

So I withdrawn my previous "discover" comments :)

-- Kevin

More information about the postgis-users mailing list