[postgis-users] Help: Fastest way to load data.
Gregory S. Williamson
gsw at globexplorer.com
Thu Feb 19 01:14:13 PST 2004
Use the COPY command -- much faster than individual inserts, even if they are grouped together into largish transactions. Also, make sure you have enough WAL buffers as large volume inserts definitely use them -- you'll see warning messages in your log file if you don't have enough. Drop indexes before inserting, then recreate them, then do the vauum analyze and update of geostatistics.
On a linux box w/ 2 gigs of ram and 2 cpus, postgres 7.4, loading, indexing and vacuuming tables with 500000 rows takes only a few minutes. Most of the data in WKT from Informix massaged through a perl script into postgres format with the proper SRID, etc.
Greg Williamson
DBA
GlobeXplorer LLC
-----Original Message-----
From: Jeremy Palmer [mailto:jpalmer at paradise.net.nz]
Sent: Thu 2/19/2004 1:04 AM
To: postgis-users at postgis.refractions.net
Cc:
Subject: [postgis-users] Help: Fastest way to load data.
Hi
I'm trying to import 2 million rows of WKT spatial data into a database. I
was just wondering what the faster way to do this i.e. copy or inserts. If
anyone has any tips it would be greatly appreciated.
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list