Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail
Message-ID: <3DF81FBC.1070100@earthlink.net>
From: Jonathan Leffler <jleffler@earthlink.net>
Organization: Chaotic Sputterings
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.databases.theory
Subject: Re: issues bout storage
References: <2262848.1039536123@dbforums.com> <3DF6D91D.9070000@earthlink.net> <2267675.1039619325@dbforums.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 26
Date: Thu, 12 Dec 2002 05:34:37 GMT
NNTP-Posting-Host: 66.47.74.12
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread1.prod.itd.earthlink.net 1039671277 66.47.74.12 (Wed, 11 Dec 2002 21:34:37 PST)
NNTP-Posting-Date: Wed, 11 Dec 2002 21:34:37 PST
Xref: newsfeed1.easynews.com comp.databases.theory:24059
X-Received-Date: Wed, 11 Dec 2002 22:35:21 MST (news.easynews.com)

fanquyin wrote:
> 2. what buffer replacement policy will you use if the buffer can contain
>    5 employee  records at a time and the user tries to sort employees by
>    their SSN?
> Make sure I have more than 200 buffers available so it all fits
> in memory.
> 
> --I'm sure there is enough buffer space.
> -- Do I need to consider about least used, most used records. or things
> like that for the buffer replacement?

It depends on what else is demanding the use of those buffers.  If all 
the data in the database is in your employee table, then it matters 
not at all which, if any, replacement algorithm you use.  If you need 
to share those buffers with other tables, then the optimal buffer 
replacement algorithm is to evict from cache the pages that won't be 
used for the longest time.  The hard part is working out which pages 
those are.  Remember: past performance is not a reliable indicator of 
what will happen in the future (but it's the best you've got to work 
with).

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix 1.04.PC1 -- http://dbi.perl.org/

