Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 449C82E0037 for ; Thu, 10 Apr 2008 14:09:36 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 67184-04 for ; Thu, 10 Apr 2008 14:09:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by developer.postgresql.org (Postfix) with ESMTP id 75B572E005C for ; Thu, 10 Apr 2008 14:09:26 -0300 (ADT) Received: from vanquish.ws.pitbpa0.priv.collaborativefusion.com (vanquish.ws.pitbpa0.priv.collaborativefusion.com [192.168.2.162]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Thu, 10 Apr 2008 13:10:07 -0400 id 00056410.47FE49EF.00000E17 Date: Thu, 10 Apr 2008 13:08:54 -0400 From: Bill Moran To: John Beaver Cc: Gaetano Mendola , Pgsql-Performance Subject: Re: large tables and simple "= constant" queries using indexes Message-Id: <20080410130854.f3a3f110.wmoran@collaborativefusion.com> In-Reply-To: <47FE4259.7030704@gmail.com> References: <47FD2DF3.80500@gmail.com> <47FD3350.4060504@tweakers.net> <47FD4212.8040404@gmail.com> <47FDBE23.8020402@tweakers.net> <47FE27EB.8050804@gmail.com> <47FE3DC7.4010700@gmail.com> <47FE4259.7030704@gmail.com> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.8; i386-portbld-freebsd6.3) 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: 200804/133 X-Sequence-Number: 29626 In response to John Beaver : > Thanks Eric and Gaestano - interesting, and both examples of my naivite. :) > > I tried running large select(*) queries on other tables followed by another try at the offending query, and it was still fast. Just to be absolutely sure this is a scalable solution, I'll try restarting my computer in a few hours to see if it affects anything cache-wise. I say this over and over again ... because I think it's really cool and useful. If you install the pg_buffercache addon, you can actually look into PostgreSQL's internals and see what tables are in the buffer in real time. If you're having trouble, it can (potentially) be a helpful tool. -- Bill Moran Collaborative Fusion Inc. http://people.collaborativefusion.com/~wmoran/ wmoran@collaborativefusion.com Phone: 412-422-3463x4023