Re: Insert performance, what should I expect?

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Robert Creager <Robert_Creager(at)LogicalChaos(dot)org>
Cc: Brock Henry <brock(dot)henry(at)gmail(dot)com>, Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Insert performance, what should I expect?
Date: 2004-10-20 17:20:19
Message-ID: 1098292819.747.188.camel@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 2004-10-20 at 12:45, Robert Creager wrote:
> When grilled further on (Tue, 19 Oct 2004 22:12:28 -0400),
> Rod Taylor <pg(at)rbt(dot)ca> confessed:
>
> > > I've done some manual benchmarking running my script 'time script.pl'
> > > I realise my script uses some of the time, bench marking shows that
> > > %50 of the time is spent in dbd:execute.
> > >
> > 1) Drop DBD::Pg and switch to the Pg driver for Perl instead (non-DBI
> > compliant) which has functions similar to putline() that allow COPY to
> > be used.
>
> COPY can be used with DBD::Pg, per a script I use:
>
> $dbh->do( "COPY temp_obs_$band ( $col_list ) FROM stdin" );
> $dbh->func( join ( "\t", @data ) . "\n", 'putline' );
> $dbh->func( "\\.\n", 'putline' );
> $dbh->func( 'endcopy' );

Thanks for that. All of the conversations I've seen on the subject
stated that DBD::Pg only supported standard DB features -- copy not
amongst them.

> With sets of data from 1000 to 8000 records, my COPY performance is consistent
> at ~10000 records per second.

Well done.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Manfred Spraul 2004-10-20 17:39:13 Re: futex results with dbt-3
Previous Message Tom Lane 2004-10-20 17:15:35 Re: futex results with dbt-3