X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 35E2D53ED2 for ; Tue, 10 May 2005 12:04:02 -0300 (ADT) 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 55526-10 for ; Tue, 10 May 2005 15:03:59 +0000 (GMT) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id 282ED53A35 for ; Tue, 10 May 2005 12:03:58 -0300 (ADT) Received: from 216-154-14-104.dsl.look.ca (216-154-14-104.dsl.look.ca [216.154.14.104]) by tht.net (Postfix) with ESMTP id 1CDADAA4BB; Tue, 10 May 2005 10:18:19 -0400 (EDT) Subject: Re: Prefetch From: Rod Taylor To: molson@oceanconsulting.com Cc: pgsql-performance@postgresql.org In-Reply-To: <200505100652.51401.molson@oceanconsulting.com> References: <200505100652.51401.molson@oceanconsulting.com> Content-Type: text/plain Date: Tue, 10 May 2005 10:17:59 -0400 Message-Id: <1115734679.6888.63.camel@home> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200505/143 X-Sequence-Number: 12307 > I've done other things that make sense, like using indexes, playing with the > planner constants and turning up the postgres cache buffers. After you load the new days data try running CLUSTER on the structure using a key of (stockID, date) -- probably your primary key. This should significantly reduce the amount of IO required for your calculations involving a few stocks over a period of time. --