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 DEF02534BC for ; Wed, 6 Apr 2005 19:46:40 +0100 (BST) 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 56864-03 for ; Wed, 6 Apr 2005 18:46:39 +0000 (GMT) Received: from priv-edtnes27.telusplanet.net (outbound04.telus.net [199.185.220.223]) by svr1.postgresql.org (Postfix) with ESMTP id B2064534C7 for ; Wed, 6 Apr 2005 19:46:38 +0100 (BST) Received: from localhost ([199.185.220.240]) by priv-edtnes27.telusplanet.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050406184639.MCDL6807.priv-edtnes27.telusplanet.net@localhost> for ; Wed, 6 Apr 2005 12:46:39 -0600 Received: from 209.17.183.249 ( [209.17.183.249]) as user a3a18850@204.209.205.53 by webmail.telus.net with HTTP; Wed, 6 Apr 2005 11:46:39 -0700 Message-ID: <1112813199.42542e8f17b4d@webmail.telus.net> Date: Wed, 6 Apr 2005 11:46:39 -0700 From: Mischa To: pgsql-performance@postgresql.org Subject: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?) References: <33c6269f05040608377dfc9272@mail.gmail.com> In-Reply-To: <33c6269f05040608377dfc9272@mail.gmail.com> 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: 209.17.183.249 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: 200504/118 X-Sequence-Number: 11515 This thread seems to be focusing in on COPY efficiency, I'd like to ask something I got no answer to, a few months ago. Using COPY ... FROM STDIN via the Perl DBI (DBD::Pg) interface, I accidentally strung together several \n-terminated input lines, and sent them to the server with a single "putline". To my (happy) surprise, I ended up with exactly that number of rows in the target table. Is this a bug? Is this fundamental to the protocol? Since it hasn't been documented (but then, "endcopy" isn't documented), I've been shy of investing in perf testing such mass copy calls. But, if it DOES work, it should be reducing the number of network roundtrips. So. Is it a feechur? Worth stress-testing? Could be VERY cool. -- "Dreams come true, not free."