Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1AE5C9FB385 for ; Wed, 25 Oct 2006 09:22:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 87392-07-2 for ; Wed, 25 Oct 2006 09:21:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 3D0419FB3AC for ; Wed, 25 Oct 2006 09:19:00 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (84-72-188-217.dclient.hispeed.ch [84.72.188.217]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 5DA71659AF; Wed, 25 Oct 2006 14:21:29 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 8D03218148BB6; Wed, 25 Oct 2006 14:18:52 +0200 (CEST) Message-ID: <453F562C.60609@logix-tt.com> Date: Wed, 25 Oct 2006 14:18:52 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.7 (X11/20060927) MIME-Version: 1.0 To: Worky Workerson Cc: pgsql-performance@postgresql.org Subject: Re: Best COPY Performance References: <453C8B0D.4070803@logix-tt.com> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.305 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/512 X-Sequence-Number: 21641 Hi, Worky, Worky Workerson wrote: > $ psql -c "COPY my_table TO STDOUT" > my_data > $ ls my_data > 2018792 edgescape_pg_load > $ time cat my_data | psql -c "COPY mytable FROM STDIN" > real 5m43.194s > user 0m35.412s > sys 0m9.567s That's via PSQL, and you get about 5 MB/Sec. >> On a table with no indices, triggers and contstraints, we managed to >> COPY about 7-8 megabytes/second with psql over our 100 MBit network, so >> here the network was the bottleneck. > > hmm, this makes me think that either my PG config is really lacking, > or that the SAN is badly misconfigured, as I would expect it to > outperform a 100Mb network. As it is, with a straight pipe to psql > COPY, I'm only working with a little over 5.5 MB/s. Could this be due > to the primary key index updates? Yes, index updates cause both CPU load, and random disk access (which is slow by nature). HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org