X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0DC9211F6227 for ; Tue, 4 Apr 2006 17:26:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07971-08 for ; Tue, 4 Apr 2006 17:26:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id ABA9511F61C9 for ; Tue, 4 Apr 2006 17:26:48 -0300 (ADT) Received: from [172.30.3.138] (unknown [64.251.112.4]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id F16D556408; Tue, 4 Apr 2006 15:26:40 -0500 (CDT) In-Reply-To: <200604021530.55251.josh@agliodbs.com> References: <2F1712F1-E5E2-455E-A291-06F300A66549@clickspace.com> <200603292118.50033.josh@agliodbs.com> <200604021530.55251.josh@agliodbs.com> Mime-Version: 1.0 (Apple Message framework v746.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <393CBC49-14DB-4CBE-B824-7541CBD7BACC@pervasive.com> Cc: pgsql-performance@postgresql.org Content-Transfer-Encoding: 7bit From: Jim Nasby Subject: Re: Query using SeqScan instead of IndexScan Date: Tue, 4 Apr 2006 16:26:37 -0400 To: Josh Berkus X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200604/52 X-Sequence-Number: 18136 On Apr 2, 2006, at 6:30 PM, Josh Berkus wrote: >> But just as a follow up question to your #1 suggestion, I have 8 GB >> of ram in my production server. You're saying to set the >> effective_cache_size then to 5 GB roughly? Somewhere around 655360? >> Currently it is set to 65535. Is that something that's OS dependent? >> I'm not sure how much memory my server sets aside for disk caching. > > Yes, about. It's really a judgement call; you're looking for the > approximate > combined RAM available for disk caching and shared mem. However, > this is > just used as a way of estimating the probability that the data you > want is > cached in memory, so you're just trying to be order-of-magnitude > accurate, > not to-the-MB accurate. FWIW, I typically set effective_cache_size to the amount of memory in the machine minus 1G for the OS and various other daemons, etc. But as Josh said, as long as your somewhere in the ballpark it's probably good enough. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461