Insert statements really slow

From: "Waller, David" <Waller_D(at)IMSDM(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Insert statements really slow
Date: 2007-11-09 17:53:08
Message-ID: DEC16B2C3347C64BAC476767D0B36229038AC4F7@JACO.sccompanies.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-11-09 18:01:33 Re: Insert statements really slow
Previous Message Tom Lane 2007-11-09 17:52:37 Re: Optimal time series sampling.