Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 4E4412E2F3A for ; Tue, 27 Nov 2007 20:28:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 24994-03 for ; Tue, 27 Nov 2007 20:28:22 -0400 (AST) Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 7B73A2E2F0F for ; Tue, 27 Nov 2007 20:28:22 -0400 (AST) Received: from trofast.ipv6.sesse.net ([2001:700:300:1803:20e:cff:fe36:a766] helo=trofast.sesse.net) by cassarossa.samfundet.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IxAmp-0006uT-6R; Wed, 28 Nov 2007 01:28:19 +0100 Received: from root by trofast.sesse.net with local (Exim 4.68) (envelope-from ) id 1IxAmo-0006N6-El; Wed, 28 Nov 2007 01:28:18 +0100 Date: Wed, 28 Nov 2007 01:28:18 +0100 From: "Steinar H. Gunderson" To: Tom Lane Cc: cluster , pgsql-performance@postgresql.org Subject: Re: Query only slow on first run Message-ID: <20071128002818.GA24445@uio.no> Mail-Followup-To: Tom Lane , cluster , pgsql-performance@postgresql.org References: <20071127165543.GY11978@crankycanuck.ca> <23999.1196184368@sss.pgh.pa.us> <056501c83128$55d58a90$8e00a8c0@tridecap.com> <20071127233833.GA24031@uio.no> <15029.1196209554@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <15029.1196209554@sss.pgh.pa.us> X-Operating-System: Linux 2.6.20.4 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/333 X-Sequence-Number: 27748 On Tue, Nov 27, 2007 at 07:25:54PM -0500, Tom Lane wrote: >> You could make an index on (question_id,status) (or a partial index on >> question id, with status=1 as the filter), but I'm not sure how much it would >> help you unless the questions table is extremely big. It doesn't appear to >> be; in fact, it appears to be all in RAM, so that's not your bottleneck. > Wouldn't help, because the accesses to "questions" are not the problem. Yes, that was my point too. :-) /* Steinar */ -- Homepage: http://www.sesse.net/