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 C4B3432A42A for ; Mon, 4 Oct 2004 18:53: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 96984-03 for ; Mon, 4 Oct 2004 17:53:43 +0000 (GMT) Received: from gp.word-to-the-wise.com (gp.word-to-the-wise.com [64.71.176.18]) by svr1.postgresql.org (Postfix) with ESMTP id 92DDC32A417 for ; Mon, 4 Oct 2004 18:53:44 +0100 (BST) Received: by gp.word-to-the-wise.com (Postfix, from userid 500) id 64D7190000E; Mon, 4 Oct 2004 11:00:36 -0700 (PDT) Date: Mon, 4 Oct 2004 11:00:36 -0700 From: Steve Atkins To: pgsql-performance@postgresql.org Subject: Re: Performance suggestions for an update-mostly database? Message-ID: <20041004180036.GA26390@gp.word-to-the-wise.com> References: <20041004174019.GA25671@gp.word-to-the-wise.com> <200410041038.14571.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410041038.14571.josh@agliodbs.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/32 X-Sequence-Number: 8508 On Mon, Oct 04, 2004 at 10:38:14AM -0700, Josh Berkus wrote: > Steve, > > > I'm used to performance tuning on a select-heavy database, but this > > will have a very different impact on the system. Does anyone have any > > experience with an update heavy system, and have any performance hints > > or hardware suggestions? > > Minimal/no indexes on the table(s). Raise checkpoint_segments and consider > using commit_siblings/commit_delay if it's a multi-stream application. > Figure out ways to do inserts instead of updates where possible, and COPY > instead of insert, where possible. Put your WAL on its own disk resource. Thanks. > I'm a little curious as to what kind of app would be 95% writes. A log? It's the backend to a web application. The applications mix of queries is pretty normal, but it uses a large, in-core, write-through cache between the business logic and the database. It has more than usual locality on queries over short time periods, so the vast majority of reads should be answered out of the cache and not touch the database. In some ways something like Berkeley DB might be a better match to the frontend, but I'm comfortable with PostgreSQL and prefer to have the power of SQL commandline for when I need it. Cheers, Steve