From: Jason E. Stewart <jason@openinformatics.com>
To: Pete Leonard <pete@hero.com>
Cc: dbi-dev@perl.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: DBD::Pg timings
Date: 21 Nov 2002 10:06:20 -0700
Message-ID: <87u1iahmyb.fsf@openinformatics.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10211210827450.12590-100000@hero.com>
References: <Pine.LNX.4.10.10211210827450.12590-100000@hero.com>
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" <pete@hero.com> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jason@openinformatics.com, pete@hero.com, dbi-dev@perl.org
Subject: Re: DBD::Pg timings
In-Reply-To: <87u1iahmyb.fsf@openinformatics.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox