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 2FB78539D1; Fri, 1 Apr 2005 22:03:48 +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 57634-09; Fri, 1 Apr 2005 21:03:38 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8740E539C9; Fri, 1 Apr 2005 22:03:38 +0100 (BST) 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 j31L3bgL028576; Fri, 1 Apr 2005 16:03:37 -0500 (EST) To: Mike Nolan Cc: scrappy@postgresql.org (Marc G. Fournier), pgsql-performance@postgresql.org Subject: Re: Sustained inserts per sec ... ? In-reply-to: <200504011927.j31JRFMK006424@gw.tssi.com> References: <200504011927.j31JRFMK006424@gw.tssi.com> Comments: In-reply-to Mike Nolan message dated "Fri, 01 Apr 2005 13:27:14 -0600" Date: Fri, 01 Apr 2005 16:03:37 -0500 Message-ID: <28575.1112389417@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/20 X-Sequence-Number: 11417 Mike Nolan writes: > Well, I just did an insert of 27,500 records with 9 fields, averaging > around 118 bytes per record, each insert statement coming from a separate > SQL statement fed to psql, and it took a bit over 4 minutes, or about > 106 inserts per second. Is that with a separate transaction for each insert command? I can get significantly higher rates on my devel machine if the inserts are bundled into transactions of reasonable length. With fsync on, you can't expect to get more than about one commit per disk rotation (with a single inserting process), so with say a 7200RPM drive (120 revs/sec) the above is a pretty good fraction of the theoretical limit. regards, tom lane