pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Brown <time@bigpond.net.au>
To: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-performance@postgresql.org
Subject: Re: index scan on =, but not < ?
Date: Thu, 10 Mar 2005 10:06:23 +1000
Message-ID: <422F8F7F.2040505@bigpond.net.au> (raw)
In-Reply-To: <20050309052020.GB1569@wolff.to>
References: <001f01c5240d$a920c8c0$0200a8c0@dell8200>
	<20050309043821.GA1569@wolff.to>
	<20050309045519.GA509@decibel.org>
	<20050309052020.GB1569@wolff.to>

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.
>  
>



view thread (12+ messages)  latest in thread

Message-ID: <422F8F7F.2040505@bigpond.net.au>
Permalink:  ../422F8F7F.2040505@bigpond.net.au/
Also on:    postgresql.org/message-id/422F8F7F.2040505@bigpond.net.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: time@bigpond.net.au, bruno@wolff.to
  Subject: Re: index scan on =, but not < ?
  In-Reply-To: <422F8F7F.2040505@bigpond.net.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox