Re: bulk inserts

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: bulk inserts
Date: 2009-09-29 16:04:37
Message-ID: 20090929160437.GQ5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 29, 2009 at 08:45:55AM -0700, Alan Hodgson wrote:
> On Tuesday 29 September 2009, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
> > it's faster is because
> > parsing CSV data is easier than parsing SQL.
> >
> > At least I think that's the only difference; anybody know better?
>
> I think a big reason is also that the client can stream the data without
> waiting for a network round trip ack on every statement.

I don't think so. I'm pretty sure you can send multiple statements in a
single round trip. libpq is defined to work in such cases anyway:

http://www.postgresql.org/docs/current/static/libpq-exec.html

--
Sam http://samason.me.uk/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2009-09-29 16:11:19 Re: bulk inserts
Previous Message Sam Mason 2009-09-29 16:01:59 Re: computed values in plpgsql