Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2DFC82E0037 for ; Fri, 22 Feb 2008 01:10:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76332-03 for ; Fri, 22 Feb 2008 01:10:32 -0400 (AST) Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by postgresql.org (Postfix) with ESMTP id 4B9562E00CD for ; Fri, 22 Feb 2008 01:10:32 -0400 (AST) Received: from zmori.markir.net (121-72-73-8.dsl.telstraclear.net [121.72.73.8]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0JWM00GM1JP6FM30@smtp3.clear.net.nz> for pgsql-performance@postgresql.org; Fri, 22 Feb 2008 18:10:31 +1300 (NZDT) Date: Fri, 22 Feb 2008 18:10:18 +1300 From: Mark Kirkwood Subject: Re: 4s query want to run faster In-reply-to: To: Scott Marlowe Cc: Adonias Malosso , Claus Guttesen , pgsql-performance@postgresql.org Message-id: <47BE593A.8000709@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <8a5d3c890802211248k7d9dfbb5ndd645358a84130a7@mail.gmail.com> <8a5d3c890802211311m5fab66d6q865fda1737e47802@mail.gmail.com> <8a5d3c890802211323j2a7e2ebdye42f988222046e44@mail.gmail.com> <47BE023A.6000905@paradise.net.nz> User-Agent: Thunderbird 2.0.0.9 (X11/20071203) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/282 X-Sequence-Number: 28824 Scott Marlowe wrote: > > effective_cache_size is pretty easy to set, and it's not real > sensitive to small changes, so guesstimation is fine where it's > concerned. Basically, let your machine run for a while, then add the > cache and buffer your unix kernel has altogether (top and free will > tell you these things). If you're running other apps on the server, > make a SWAG (scientific wild assed guess) how much the other apps are > pounding on the kernel cache / buffer and set effective_cache_size to > how much you think postgresql is using of the total and set it to > that. > FWIW - The buffered|cached may well be called something different if you are not on Linux (I didn't see any platform mentioned - sorry if I missed it) - e.g for Freebsd it is "Inactive" that shows what the os is caching and "Cached" actually means something slightly different... (yep that's caused a lot of confusion in the past...) Cheers Mark