Re: question about storage and DBMS

From: ddf <oratune_at_msn.com>
Date: Mon, 21 Nov 2011 10:34:04 -0800 (PST)
Message-ID: <7b73ae24-a91a-4fff-b890-83ec6580eded_at_y14g2000prf.googlegroups.com>



On Nov 21, 10:21 am, elodie <elodie.gill..._at_gmail.com> wrote:
> Hi everyone,
>
> I am working on the following question. I would appreciate if someone
> could help me with it.
>
> You are running a DBMS on a computer which has a 3kByte disk block.
> Table T in your database D has size 200MBytes. You execute a query:
> “select * from T”.
> How much data will be read from the drive? Assume that n*size_of_tuple
> = block_size, where n is natural.
>
> I am thinking that 200,000/3=66,666.667
>  so that reading the database is going to take 66,667 disk blocks.
> That would mean 66,6667*3kBytes=200,001kB
>
> Thanks for your help.

You're assuming no prior reads from that table have been executed, leaving no blocks in the buffer cache. This may or may not be true. As a maximum 66,667 disk blocks (at the O/S level) would be read however Oracle doesn't allow a 3k block size (the available values are 2k, 4k, 8k, 16k and 32k). I also doubt that any disk manufacturer or O/S vendor would configure disks with a 3k block size as it would be extremely inefficient.

I can presume, then, this is homework and is designed solely for you to practice such calculations.

David Fitzjarrell Received on Mon Nov 21 2011 - 12:34:04 CST

Original text of this message