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 08C3355E26 for ; Thu, 10 Mar 2005 00:06:32 +0000 (GMT) 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 97090-03 for ; Thu, 10 Mar 2005 00:06:22 +0000 (GMT) Received: from gizmo11bw.bigpond.com (gizmo11bw.bigpond.com [144.140.70.21]) by svr1.postgresql.org (Postfix) with SMTP id 7598D555BA for ; Thu, 10 Mar 2005 00:06:19 +0000 (GMT) Received: (qmail 2601 invoked from network); 10 Mar 2005 00:06:19 -0000 Received: from unknown (HELO bwmam05.bigpond.com) (144.135.24.81) by gizmo11bw.bigpond.com with SMTP; 10 Mar 2005 00:06:19 -0000 Received: from cpe-203-45-203-73.qld.bigpond.net.au ([203.45.203.73]) by bwmam05.bigpond.com(MAM REL_3_4_2a 44/6526778) with SMTP id 6526778; Thu, 10 Mar 2005 10:06:19 +1000 Message-ID: <422F8F7F.2040505@bigpond.net.au> Date: Thu, 10 Mar 2005 10:06:23 +1000 From: David Brown User-Agent: Mozilla Thunderbird 1.0RC1 (Windows/20041201) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruno Wolff III Cc: pgsql-performance@postgresql.org Subject: Re: index scan on =, but not < ? References: <001f01c5240d$a920c8c0$0200a8c0@dell8200> <20050309043821.GA1569@wolff.to> <20050309045519.GA509@decibel.org> <20050309052020.GB1569@wolff.to> In-Reply-To: <20050309052020.GB1569@wolff.to> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.764 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_WHOIS X-Spam-Level: X-Archive-Number: 200503/174 X-Sequence-Number: 10879 Assuming your system isn't starved for memory, shouldn't repeated page fetches be hitting the cache? I've also wondered about the conventional wisdom that read ahead doesn't help random reads. I may well be missing something, but *if* the OS has enough memory to cache most of the table, surely read ahead will still work to your advantage? Bruno Wolff III wrote: >No. When you are doing an index scan of a significant part of the table, >you will fetch some heap pages more than once. You will also be fetching >blocks out of order, so you will lose out on read ahead optimization >by the OS. This assumes that you don't get a lot of cache hits on the >help pages. If a significant portion of the table is cached, then the >trade off point will be at a higher percentage of the table. > >