X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B2E62DAAA7 for ; Wed, 9 Nov 2005 22:58:26 -0400 (AST) 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 96737-01 for ; Thu, 10 Nov 2005 02:58:22 +0000 (GMT) X-Greylist: delayed 03:05:01.144894 by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id E6257DA932 for ; Wed, 9 Nov 2005 22:58:23 -0400 (AST) Received: from frank.wiles.org (frank.wiles.org [24.124.39.75]) by svr2.postgresql.org (Postfix) with ESMTP id ECE64F12C0 for ; Wed, 9 Nov 2005 23:53:24 +0000 (GMT) Received: from kungfu (frank.wiles.org [127.0.0.1]) by frank.wiles.org (8.13.1/8.13.1) with SMTP id jA9NrFN3006953; Wed, 9 Nov 2005 17:53:15 -0600 Date: Wed, 9 Nov 2005 17:53:32 -0600 From: Frank Wiles To: Alvaro Herrera Cc: rjpeace@earthlink.net, yves.vindevogel@implements.be, pgsql-performance@postgresql.org Subject: Re: Some help on buffers and other performance tricks Message-Id: <20051109175332.3edbd5fc.frank@wiles.org> In-Reply-To: <20051109230752.GC8230@surnet.cl> References: <17035565.1131571489652.JavaMail.root@elwamui-hound.atl.sa.earthlink.net> <20051109230752.GC8230@surnet.cl> X-Mailer: Sylpheed version 2.0.1 (GTK+ 2.6.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.016 required=5 tests=[AWL=0.016] X-Spam-Score: 0.016 X-Spam-Level: X-Archive-Number: 200511/170 X-Sequence-Number: 15427 On Wed, 9 Nov 2005 20:07:52 -0300 Alvaro Herrera wrote: > IMHO you should really be examining your queries _before_ you do any > investment in hardware, because later those may prove unnecessary. It all really depends on what you're doing. For some of the systems I run, 4 GBs of RAM is *WAY* overkill, RAID 1+0 is overkill, etc. In general I would slightly change the "order of operations" from: 1) Buy tons of RAM 2) Buy lots of disk I/O 3) Tune your conf 4) Examine your queries to 1) Tune your conf 2) Spend a few minutes examining your queries 3) Buy as much RAM as you can afford 4) Buy as much disk I/O as you can 5) Do in depth tuning of your queries/conf Personally I avoid planning my schema around my performance at the start. I just try to represent the data in a sensible, normalized way. While I'm sure I sub-consciously make decisions based on performance considerations early on, I don't do any major schema overhauls until I find I can't get the performance I need via tuning. Obviously there are systems/datasets/quantities where this won't always work out best, but for the majority of systems out there complicating your schema, maxing your hardware, and THEN tuning is IMHO the wrong approach. --------------------------------- Frank Wiles http://www.wiles.org ---------------------------------