[postgis-users] Insert performance issues

Nicolas RIBOT nri at scot.cnes.fr
Tue Oct 28 10:24:40 PST 2003


Hello Charlton,

The table is accessed by several clients and cannot be locked during
copy.
Furthermore, but I may be wrong, I understood that the copy command must
provide a value for each attribute in the row.
In our table, the identifier is generated by a sequence.
I thought that only inserts could update sequence values correctly.

Nicolas

> -----Message d'origine-----
> De : Charlton Purvis [mailto:cpurvis at asg.sc.edu]
> Envoyé : lundi 27 octobre 2003 19:59
> À : PostGIS Users Discussion
> Objet : RE: [postgis-users] Insert performance issues
> 
> 
> Sorry to have joined the thread so late.  Good chance that I've missed
> the crux of the messages.
> 
> But I read through the thread, and your initial questioned 
> seemed to be
> centered around insert performance.  And I am intimate w/ that beast.
> 
> I'd HIGHLY recommend that you use the pgsql COPY command 
> instead of lots
> of inserts.  It reduced my insert time exponentially from 
> something like
> 12 hours to 5 minutes for about 5 million records.  Kind of crazy, eh?
> 
> That is, if you can lock the table you're updating w/o effecting your
> production system.  Also, removing all indices on the table before
> copying helps, too.  Then rebuild and analyze them once your table is
> populated.
> 
> Charlton
> 
> _______________________________________________
> 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