Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> (no subject)

(no subject)

From: jaimin <jaimin_at_rolta.com>
Date: Sun, 12 Aug 2001 20:09:43 -0700
Message-ID: <F001.003688F6.20010812201021@fatcity.com>

Thanks Anita,

        That clears my doubt.

Jaimin.

-----Original Message-----
Sent: Saturday, August 11, 2001 10:18 PM To: jaimin_at_rolta.com; ORACLE-L_at_fatcity.com

Jaimin,

Oracle does not care how the file is stored at the OS level - it leaves that entirely up to the OS. All it cares about is its own layout of the blocks.

For example, let's take a datafile that is 200K. With a 2K Oracle blocksize this means the datafile can store 100 Oracle blocks. So Oracle has a layout of the datafile with all 100 blocks so it can keep track of which blocks have been allocated to extents belonging to objects and which blocks are free. When it allocates an extent the blocks must be contiguous. So given a 10K extent it can use blocks 20-24 for that extent, but not blocks 12, 18,19, 35 and 51.

If you look in DBA_EXTENTS you'll see the BLOCK_ID, indicating the first block for that extent, and BLOCKS, indicating the # of blocks in the exent. By requiring that an extent be composed of contiguous exetnts, this allows Oracle to identify the extent in a datafile in which a block resides by using just those two pieces of information. If the blocks didn't have to be contiguous, then Oracle would have to maintain some form of linked list to identify the blocks associated with an extent. Imagine the tremendous overhead this would cause and the lack of scalability with large extents and datafiles.

Now lets say that Oracle needs to read block 20 from the file, Oracle merely makes a request to the OS to read blocks 20-22 from that file. The OS in turn determines where blocks 20-22 are stored on disk and reads them. Oracle doesn't care whether blocks 20-22 are contiguous on disk as Oracle isn't managing the location of the blocks on disk, the OS is.

To put it another way, Oracle doesn't care whether the blocks are located contiguously in a physical manner, it cares that they are numbered contiguously. Block 37 will always be the 37th block in the datafile, regardless of where the OS locates that block on disk.

Does that help... or did I just muddy the waters even further? ;)


Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: jaimin
  INET: jaimin_at_rolta.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sun Aug 12 2001 - 22:09:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US