pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mischa <mischa.Sandberg@telus.net>
To: pgsql-performance@postgresql.org
Subject: Multi-line requests in COPY ... FROM STDIN
Date: Wed,  9 Mar 2005 21:29:47 -0800
Message-ID: <1110432587.422fdb4baaffd@webmail.telus.net> (raw)

I'm using a 7.4.6 Perl app that bulk-loads a table, 
by executing a "COPY TMP_Message FROM STDIN", then letting
$dbh->func($message_text."\n", "putline")

Speculation made me try catenating Several \n-terminated lines
together, and making a single putline() call with that.
Lo and behold, all the lines went in as separate rows, as I hoped.

I haven't measured the performance difference using this multiline
batching. I'm hoping that there will be as much,since the app is really sucking
on a 500 msg/sec firehose, and the db side needs serious speeding up. Question
is, am I  playing with a version-dependent anomaly, or should I expect this
to continue in 8.x (until, eventually, silently, something causes
this to break)?

I'm presuming that this is not a Perl DBI/DBD::Pg question,
but rather, depending on the underlying pq lib and fe protocol.

-- 
"Dreams come true, not free."




Message-ID: <1110432587.422fdb4baaffd@webmail.telus.net>
Permalink:  ../1110432587.422fdb4baaffd@webmail.telus.net/
Also on:    postgresql.org/message-id/1110432587.422fdb4baaffd@webmail.telus.net

 · 

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: mischa.Sandberg@telus.net
  Subject: Re: Multi-line requests in COPY ... FROM STDIN
  In-Reply-To: <1110432587.422fdb4baaffd@webmail.telus.net>

* 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