Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 64B552E2EC3 for ; Tue, 27 Nov 2007 14:56:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 69267-03 for ; Tue, 27 Nov 2007 14:55:55 -0400 (AST) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id 11EDD2E31F3 for ; Tue, 27 Nov 2007 14:55:51 -0400 (AST) Received: from vanquish.pitbpa0.priv.collaborativefusion.com (vanquish.pitbpa0.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 27 Nov 2007 13:55:50 -0500 id 00056414.474C6836.000116FA Date: Tue, 27 Nov 2007 13:55:50 -0500 From: Bill Moran To: cluster Cc: pgsql-performance@postgresql.org Subject: Re: Query only slow on first run Message-Id: <20071127135550.956f0f9e.wmoran@collaborativefusion.com> In-Reply-To: References: <20071127165543.GY11978@crankycanuck.ca> <23999.1196184368@sss.pgh.pa.us> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/324 X-Sequence-Number: 27739 In response to cluster : > >> Probably by buying much faster disk hardware. > > Or buy more RAM, so that the data can stay cached. > > So the only problem here is lack of RAM and/or disk speed? Not automatically, but the chances that more RAM and/or faster disks will improve this situation are probably 90% or better. Other things that could cause this problem are poor schema design, and unreasonable expectations. -- Bill Moran Collaborative Fusion Inc. http://people.collaborativefusion.com/~wmoran/ wmoran@collaborativefusion.com Phone: 412-422-3463x4023