[postgis-users] shp2pgsql creates spatial index *before* it inserts data? Is that right?

Markus Schaber schabi at logix-tt.com
Wed Mar 8 01:41:51 PST 2006


Hi, Ethan,

Ethan Alpert wrote:
> Having just upgraded from a very old version I was playing with some of
> the new (for me at least) options to shp2pgsql.
> One thing that struck me as odd is that shp2pgsql when called with –I
> creates the index before it inserts data. Shouldn’t the index be created
> after?
> Just curious. I’m using postgresql 8.1.3 and postgis 1.1.1

Functionally, it is equivialent, but perfomance wise, it is much better
to create the index afterwards.

Patches are welcome.
HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org




More information about the postgis-users mailing list