Insert statements really slow - Mailing list pgsql-general

From Waller, David
Subject Insert statements really slow
Date
Msg-id DEC16B2C3347C64BAC476767D0B36229038AC4F7@JACO.sccompanies.com
Whole thread Raw
Responses Re: Insert statements really slow  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: Insert statements really slow  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Insert statements really slow  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-general
I have an application that I am porting from MySQL to PostgreSQL and I am working on the import Perl script that process the data.
 
The data is web log data and each line has a variable amount of the fields (mostly because of cookies) so I am using a lot of insert statements.
 
In MySQL I go through a file in about 2 minutes and it is taking about 30 in PG.  I have removed all but the primary key index and have done a BEGIN and COMMIT after turning off AUTOCOMMIT.
 
What other things should I be looking at to spped this up?
 
Dave Waller

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimal time series sampling.
Next
From: Andrew Sullivan
Date:
Subject: Re: Insert statements really slow