pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dimitri Fontaine <dfontaine@hi-media.com>
To: pgsql-performance@postgresql.org
Cc: Greg Smith <gsmith@gregsmith.com>
Subject: Re: Benchmark Data requested
Date: Wed, 6 Feb 2008 11:29:42 +0100
Message-ID: <200802061129.44482.dfontaine@hi-media.com> (raw)
In-Reply-To: <Pine.GSO.4.64.0802052211020.6216@westnet.com>
References: <1202150236.4252.521.camel@ebony.site>
	<1202248803.4252.895.camel@ebony.site>
	<Pine.GSO.4.64.0802052211020.6216@westnet.com>

Le mercredi 06 février 2008, Greg Smith a écrit :
> pgloader is a great tool for a lot of things, particularly if there's any
> chance that some of your rows will get rejected.  But the way things pass
> through the Python/psycopg layer made it uncompetative (more than 50%
> slowdown) against the straight COPY path from a rows/second perspective
> the last time (V2.1.0?) 

I've yet to add in the psycopg wrapper Marko wrote for skytools: at the moment 
I'm using the psycopg1 interface even when psycopg2 is used, and it seems the 
new version has some great performance improvements. I just didn't bother 
until now thinking this wouldn't affect COPY.

> I did what I thought was a fair test of it (usual 
> caveat of "with the type of data I was loading").  Maybe there's been some
> gigantic improvement since then, but it's hard to beat COPY when you've
> got an API layer or two in the middle.

Did you compare to COPY or \copy? I'd expect psycopg COPY api not to be that 
more costly than psql one, after all.
Where pgloader is really left behind (in term of tuples inserted per second) 
compared to COPY is when it has to jiggle a lot with the data, I'd say 
(reformat, reorder, add constants, etc). But I've tried to design it so that 
when not configured to arrange (massage?) the data, the code path is the 
simplest possible.

Do you want to test pgloader again with Marko psycopgwrapper code to see if 
this helps? If yes I'll arrange to push it to CVS ASAP.

Maybe at the end of this PostgreSQL backend code will be smarter than pgloader 
(wrt error handling and data massaging) and we'll be able to drop the 
project, but in the meantime I'll try my best to have pgloader as fast as 
possible :)
-- 
dim

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (51+ messages)  latest in thread

Message-ID: <200802061129.44482.dfontaine@hi-media.com>
Permalink:  ../200802061129.44482.dfontaine@hi-media.com/
Also on:    postgresql.org/message-id/200802061129.44482.dfontaine@hi-media.com

 · 

reply

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-performance@postgresql.org
  Cc: dfontaine@hi-media.com, gsmith@gregsmith.com
  Subject: Re: Benchmark Data requested
  In-Reply-To: <200802061129.44482.dfontaine@hi-media.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