Received: from files.kinesis-cem.com (unknown [65.101.136.90]) by postgresql.org (Postfix) with ESMTP id 18CA0474E49 for ; Wed, 20 Mar 2002 14:31:34 -0500 (EST) Received: from pdarley (pdarley [192.168.1.12] (may be forged)) (authenticated bits=0) by files.kinesis-cem.com (8.12.2/8.12.2) with ESMTP id g2KJIbl8032643; Wed, 20 Mar 2002 11:18:37 -0800 From: "Peter Darley" To: "Jodi Kanter" , "Postgres Admin List" Subject: Re: slow inserts Date: Wed, 20 Mar 2002 11:31:29 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0017_01C1D002.C75912A0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <008301c1d044$0b8fede0$de138f80@virginia.edu> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200203/271 X-Sequence-Number: 3805 This is a multi-part message in MIME format. ------=_NextPart_000_0017_01C1D002.C75912A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Jodi, I believe DBI defaults to autocommitting queries, which slows it down. If you aren't specifically turning off the autocommit, I'd suggest it, which would make all the inserts go in one transaction which makes it much faster. You'd do something like: DBI->connect("dbi:Pg:dbname=dbname;host=hostname", 'user', 'password', {AutoCommit => 0}) Thanks, Peter Darley -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi Kanter Sent: Wednesday, March 20, 2002 11:19 AM To: Postgres Admin List Subject: [ADMIN] slow inserts I am currently using a Perl data loader that was set up to load data to three particular tables. The majority of this data is entered into one table. The scripts obtain the data by parsing it out of an Excel spreadsheet. My loads seem to take a very long time. Each file only has about 12,000 rows, yet it takes close to 25 minutes to load one file. I have placed some debugging syntax in the code and it seems that the extra time if related to postgres as I had originally thought it may have to do with the parsing of the Excel file. I have tried turning off FSYNC but there is no difference in load time. I also tried removing the indexes from the table in which most of the data is loaded but no luck. By the way, is there anyway to confirm that the FSYNC option was turned off correctly? a way to view status or something? Any thoughts on what might be going on? another performance tuning trick that I have not thought of? Thanks for your help, Jodi Kanter _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu ------=_NextPart_000_0017_01C1D002.C75912A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Jodi,
    I believe DBI defaults to autocommitting queries, = which=20 slows it down.  If you aren't specifically turning off the autocommit,= I'd=20 suggest it, which would make all the inserts go in one transaction which ma= kes=20 it much faster.  You'd do something like:
    DBI->connect("dbi:Pg:dbname=3Ddbname;host=3D= hostname",=20 'user', 'password', {AutoCommit =3D> 0})
Thanks,
Peter Darley
-----Original Message-----
From:=20 pgsql-admin-owner@postgresql.org=20 [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi=20 Kanter
Sent: Wednesday, March 20, 2002 11:19 AM
To:= =20 Postgres Admin List
Subject: [ADMIN] slow=20 inserts

I am currently using a Perl data loader that was set up to load data= to=20 three particular tables. The majority of this data is entered into one ta= ble.=20 The scripts obtain the data by parsing it out of an Excel=20 spreadsheet. My loads seem to take a very long time. Each file only has a= bout=20 12,000 rows, yet it takes close to 25 minutes to load one file. I ha= ve=20 placed some debugging syntax in the code and it seems that the extra time= if=20 related to postgres as I had originally thought it may have to do with th= e=20 parsing of the Excel file.
 
I have tried turning off FSYNC but there is no difference in load ti= me. I=20 also tried removing the indexes from the table in which most of the data = is=20 loaded but no luck. By the way, is there anyway to confirm that the FSYNC= =20 option was turned off correctly? a way to view status or something?
 
Any thoughts on what might be going on? another performance tuning t= rick=20 that I have not thought of?
 
Thanks for your help,
Jodi Kanter
 

_______________________________
Jodi=20 L Kanter
BioInformatics Database Administrator
University of=20 Virginia
(434) 924-2846
jkanter@virginia.edu
<= SPAN=20 style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt;= mso-fareast-font-family: 'MS Mincho'">

 

 

 

------=_NextPart_000_0017_01C1D002.C75912A0--