Multi-line requests in COPY ... FROM STDIN - Mailing list pgsql-performance

From Mischa
Subject Multi-line requests in COPY ... FROM STDIN
Date
Msg-id 1110432587.422fdb4baaffd@webmail.telus.net
Whole thread Raw
List pgsql-performance
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."


pgsql-performance by date:

Previous
From: Jim Johannsen
Date:
Subject: Re: Help trying to tune query that executes 40x slower
Next
From: Karim Nassar
Date:
Subject: What's better: Raid 0 or disk for seperate pg_xlog