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 1FAE153570 for ; Thu, 7 Apr 2005 13:23:20 +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 51907-01 for ; Thu, 7 Apr 2005 12:23:17 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id F127452808 for ; Thu, 7 Apr 2005 13:23:16 +0100 (BST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DJVzP-0006GG-FR for pgsql-performance@postgresql.org; Thu, 07 Apr 2005 14:20:03 +0200 Received: from srv.protecting.net ([212.126.218.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Apr 2005 14:20:03 +0200 Received: from hf1122x by srv.protecting.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Apr 2005 14:20:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Harald Fuchs Subject: Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?) Date: 07 Apr 2005 14:21:53 +0200 Organization: Linux Private Site Lines: 24 Message-ID: References: <33c6269f05040608377dfc9272@mail.gmail.com> <1112813199.42542e8f17b4d@webmail.telus.net> Reply-To: hf1122x@protecting.net Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: srv.protecting.net User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/151 X-Sequence-Number: 11548 In article <1112813199.42542e8f17b4d@webmail.telus.net>, Mischa writes: > 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. Using COPY from DBD::Pg _is_ documented - presumed you use DBD::Pg version 1.41 released just today.