Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D54AA9FA381 for ; Tue, 6 Feb 2007 10:45:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 64070-04 for ; Tue, 6 Feb 2007 10:45:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 8F0819FA2A1 for ; Tue, 6 Feb 2007 10:45:06 -0400 (AST) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 3A10915A303; Tue, 6 Feb 2007 14:05:29 +0000 (GMT) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 172D82741A2; Tue, 6 Feb 2007 14:05:29 +0000 (GMT) Message-ID: <45C88B28.1010503@archonet.com> Date: Tue, 06 Feb 2007 14:05:28 +0000 From: Richard Huxton User-Agent: IceDove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: "Hiltibidal, Robert" Cc: pgsql-sql@postgresql.org Subject: Re: Index ANDing & Index ORing References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/54 X-Sequence-Number: 27388 Hiltibidal, Robert wrote: > Keep in mind that 2/3 of the inserts are actual log entries. 1/3 are for > supporting information like ip, query string values etc. > > The table is a "star" table. > > You are correct tho in terms of time.. When I did the same application > with fpc pascal (http://www.freepascal.org) and MS SQL 2000 I averaged > over 700 inserts a second on a Compaq DL380 with 2 gb ram and dual 1.3 > ghz processors. 15000 rpm scsi hard drives in a raid 5 config. > > The different there is MS SQL 2000 allows transaction logging to be > turned off. I think the transaction logging presents a "speed bump" If you can batch things into transactions of 2+ inserts (up to say 5000) you'll find things go much faster. The limiting factor should be (as you say) the speed of committing the transaction log. Failing that, try having the WAL on its own disks, with battery-backed write cache too. Failing that, you can turn fsync off, but don't complain if the power fails and your database gets corrupted. -- Richard Huxton Archonet Ltd