Creating spatial indexes on geography slower than on geometry?

Marco Boeringa marco at boeringa.demon.nl
Fri Nov 1 02:16:41 PDT 2024


Hi,

I wondered if this is a known issue with geography. Up to now, I have 
always been using geometry but as a test with the new osm2pgsql v2.0.0, 
I have loaded Planet data of OpenStreetMap using geography. While most 
of that operation is about the same speed as with geometry, I see the 
creation of spatial indexes (GiST) on geography, taking about 2.5x times 
the amount of time it took on geometry.

I appreciate geography is not geometry, and the underlying technical 
implementation details of the two may well explain the difference, but I 
am just wondering if someone can confirm this is a normal and expected 
observation for the difference between these two storage options 
regarding indexing.

Marco



More information about the postgis-users mailing list