Re: issues bout storage
From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Wed, 11 Dec 2002 06:21:03 GMT
Message-ID: <3DF6D91D.9070000_at_earthlink.net>
Date: Wed, 11 Dec 2002 06:21:03 GMT
Message-ID: <3DF6D91D.9070000_at_earthlink.net>
fanquyin wrote:
> I have two questions on data storage:
> say, there is an employee table contains 1000 employee records.
>
> 1. what would you do if queries frequently use salary range as well as
> department?
Index both salary and department in two separate indexes? Though the table is so small that it would fit in memory, so maybe there isn't a benefit to indexing after all.
> 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.
Boy, sure is a tough homework assignment.
-- 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 Wed Dec 11 2002 - 07:21:03 CET