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 273F353429 for ; Wed, 20 Apr 2005 00:06:05 -0300 (ADT) 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 91007-08 for ; Wed, 20 Apr 2005 03:05:56 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1A3C75337F for ; Wed, 20 Apr 2005 00:05:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3K35se0019671; Tue, 19 Apr 2005 23:05:54 -0400 (EDT) To: "Jim C. Nasby" Cc: pgsql-performance@postgresql.org Subject: Re: Slow copy with little CPU/disk usage In-reply-to: <20050420020033.GZ58835@decibel.org> References: <20050420020033.GZ58835@decibel.org> Comments: In-reply-to "Jim C. Nasby" message dated "Tue, 19 Apr 2005 21:00:33 -0500" Date: Tue, 19 Apr 2005 23:05:54 -0400 Message-ID: <19670.1113966354@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/483 X-Sequence-Number: 11880 "Jim C. Nasby" writes: > A friend of mine has an application where he's copying in 4000 rows at a > time into a table that has about 4M rows. Each row is 40-50 bytes. This > is taking 25 seconds on a dual PIII-1GHz with 1G of RAM and a 2 disk > SATA mirror, running FBSD 4.10-stable. There's one index on the table. If there's no hidden costs such as foreign key checks, that does seem pretty dang slow. > What's really odd is that neither the CPU or the disk are being > hammered. The box appears to be pretty idle; the postgresql proces is > using 4-5% CPU. It's very hard to believe that *neither* disk nor CPU is maxed. Can we see a reproducible test case, please? regards, tom lane