Re: issues bout storage

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Thu, 12 Dec 2002 05:34:37 GMT
Message-ID: <3DF81FBC.1070100_at_earthlink.net>


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_at_earthlink.net, jleffler_at_us.ibm.com
Guardian of DBD::Informix 1.04.PC1 -- http://dbi.perl.org/
Received on Thu Dec 12 2002 - 06:34:37 CET

Original text of this message