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

Ethan Alpert ealpert at digitalglobe.com
Wed Mar 8 09:46:56 PST 2006

Shouldn't a VACUUM ANALYZE <table_name> also occur ?

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Markus Schaber
Sent: Wednesday, March 08, 2006 2:42 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] shp2pgsql creates spatial index *before*
itinserts data? Is that right?

Hi, Ethan,

Ethan Alpert wrote:
> Having just upgraded from a very old version I was playing with some
> 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
> 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.
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

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

postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list