Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E5E7D476189 for ; Thu, 21 Nov 2002 12:06:22 -0500 (EST) Received: from mpls-qmqp-04.inet.qwest.net (mpls-qmqp-04.inet.qwest.net [63.231.195.115]) by postgresql.org (Postfix) with SMTP id BFC0B476124 for ; Thu, 21 Nov 2002 12:06:21 -0500 (EST) Received: (qmail 11101 invoked by uid 0); 21 Nov 2002 17:02:30 -0000 Received: from unknown (63.231.195.4) by mpls-qmqp-04.inet.qwest.net with QMQP; 21 Nov 2002 17:02:30 -0000 Received: from albqdslgw1poolb164.albq.uswest.net (HELO amadeus) (63.227.105.164) by mpls-pop-04.inet.qwest.net with SMTP; 21 Nov 2002 17:06:26 -0000 Received: from jasons by amadeus with local (Exim 3.35 #1 (Debian)) id 18EumT-0003hh-00; Thu, 21 Nov 2002 10:06:21 -0700 Date: 21 Nov 2002 10:06:20 -0700 Message-ID: <87u1iahmyb.fsf@openinformatics.com> From: "Jason E. Stewart" To: "Pete Leonard" Cc: dbi-dev@perl.org, pgsql-interfaces@postgresql.org Subject: Re: DBD::Pg timings References: In-Reply-To: Lines: 34 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/140 X-Sequence-Number: 3388 Hey Pete, Ah, dammit, thanks for the advice. This is no longer a DBI question, so I appologize for posting it back to the list (but I thought it would be nice to get this archived for google's sake). Isn't there a nicer way to turn off indexing during a big insert other than dropping all the indexes? Cheers, jas. "Pete Leonard" writes: > Remove all indices on the tables you're inserting on, and add them once > you're done. > > I was in the same boat, inserting 1.5M records into a simple table - it > was crawling along at 10 rows/sec before I did this, 100 rows/sec > afterwards. And re-creating the indicies only takes a couple of minutes > after the fact. > > On 21 Nov 2002, Jason E. Stewart wrote: > > > Hey all, > > > > I'd be grateful if someone could give me a reality check. I have 250k > > rows I want to insert into Postgres using a simple Perl script and > > it's taking *forever*. According to my simple timings, It seems to be > > only capable of handling about 5,000 rows/hr!!! This seems > > ridiculous. This is running on a pretty speedy dual processor P4, and > > it doesn't seem to have any trouble at all with big selects.