Creating spatial indexes on geography slower than on geometry?

Paul Ramsey pramsey at cleverelephant.ca
Fri Nov 1 07:49:33 PDT 2024


Yes, building a geography index is a lot more computationally expensive.

> On Nov 1, 2024, at 2:16 AM, Marco Boeringa <marco at boeringa.demon.nl> wrote:
> 
> 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