X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0D81E56598 for ; Thu, 10 Mar 2005 05:29:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85324-07 for ; Thu, 10 Mar 2005 05:29:49 +0000 (GMT) Received: from priv-edtnes56.telusplanet.net (outbound01.telus.net [199.185.220.220]) by svr1.postgresql.org (Postfix) with ESMTP id 3B71A5659E for ; Thu, 10 Mar 2005 05:29:48 +0000 (GMT) Received: from localhost ([199.185.220.240]) by priv-edtnes56.telusplanet.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050310052947.DNXD26721.priv-edtnes56.telusplanet.net@localhost> for ; Wed, 9 Mar 2005 22:29:47 -0700 Received: from 64.180.225.200 ( [64.180.225.200]) as user a3a18850@192.168.200.1 by webmail.telus.net with HTTP; Wed, 9 Mar 2005 21:29:47 -0800 Message-ID: <1110432587.422fdb4baaffd@webmail.telus.net> Date: Wed, 9 Mar 2005 21:29:47 -0800 From: Mischa To: pgsql-performance@postgresql.org Subject: Multi-line requests in COPY ... FROM STDIN MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1-cvs X-Originating-IP: 64.180.225.200 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.082 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200503/177 X-Sequence-Number: 10882 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."