You are on page 1of 6

[ NOTE: irrespective of the type data that the block contains , the structure of the block is always the

same. Hence, inde ,data or clustered data are contained in the same structured block.!

"lock overhead # block header $%eneral information of the block &&' i. block address ii. Type of se%ment (nde )*ata etc..+ , table directory $contains information about the table havin% rows in this block+ , row directory $actual row info [includes each row piece address in the row data area!+ [NOTE: -..pace once allocated in the row directory for a row is a */T/ "0O123s O4E5HE/*, this space is not reclaimed when the row is deleted. 6. / block that is currently empty but had 78 rows at a time continues to have -88 bytes allocated in the header for the row directory. 9. Oracle reuses this space only when rows are inserted in the block.] "lock overhead # variable component , fi ed component # :; bytes to -8< bytes. 5ow *ata && &&&' contains the actual data pertainin% to table or inde . =ree .pace &&&&'$i+ allocated for insertion of new rows and for updates to rows that re>uire additional space [ for e ample, when a trailin% null is updated to a non null values !. $ii+ also holds transaction entries. / transaction entry is re>uired in a block for each (N.E5T,*E0ETE,?@*/TE and .E0E1T A. =O5 ?@*/TE statement accessin% one or more rows in the block. .pace [ for transaction entry ! &&& O. dependent &&& approximately 23 bytes.

Free Space Management &&&' automatically or manually. The in&se%ment free)used space is tracked usin% bitmaps, as opposed to free lists. The free space mana%ement that is done with the aid of bitmaps is /?TOB/T(1 free space mana%ement. /dvanta%es: $i+ ease of use. $ii+ better space utiliCation, especially for obDects with hi%hly varyin% row siCes. $iii+ better run&time adDustment to variations in concurrent access. $iv+ better multi&instance behavior in terms of performance)space utiliCation. Free Space Coalesce [ in a block ] &&&&&' The fra%mented free space in a block is coalesced only under the followin% two situations occurrin% concurrently: -. Ehen an insert or update statement attempts to use a block that contains enou%h space to accommodate the new row piece or data. 6. The free space is fra%mented so the new row piece cannot be accommodated in a conti%uous section of the block. Row Format and Size 0imits on the number of columns in a table &&& 67F. Each row piece, chained or unchained, contains &&& $i+ row header $ii+ data for all or some of the columns of rows

3.

The ima%e show a row piece in a data block. The row piece consists of the $i+ row header G consists of $-+ row overhead, $6+ number of columns, $9+ cluster key (* $if clustered+, $;+ 5OE(* of chained row piece $if any+. (t precedes the data and contains information about: $i+ row pieces $ii+ chainin% $for chained row pieces only+ $iii+ columns in the row piece $iv+ cluster keys $for clustered data only+

$ii+ column data G this section contains the column len%th and column value Sizes o the row pieces 5ow Header &' a row fully contained in one block has at least 9 bytes of row header. &'column len%th&& - byte for columns G stores 678 bytes or less. &' column len%th&& 9 bytes for columns G store more than 678 bytes. [note: column len%th are specified before its correspondin% column data.! &' column data G depends on the data type , if the data type is variable len%th, then the space re>uired to hold a value can %row and shrink with updates to the data. &' note: column data && null in a column only stores the column len%th $ Cero +. && Oracle does not store data for the null column, only the column len%th [ which is 8 ! is recorded. && =or trailin% null columns, Oracle does not even store the column len%th. !"#$% Each row consumes 2 &'#$S of the 5OE *(5E1TO5H in the block header. R"()*S o Row pieces +++++++++++++++++++ The rowid identifies each row piece by its location or address. & rowid of a %iven row piece chan%es when $a+ the row is deleted [!"#$: if the row is deleted and the correspondin% transaction is comitted and a new row is inserted , the new row can take the rowid of the deleted row.! $b+ the row is e ported and imported usin% Oracle

?tilities $c+ if the clustered key values of a row chan%e, then the row keeps the same rowid but also %ets an additional pointer rowid for the new values. @hysical 5owids G provide the fastest possible access to a row in a %iven table. & contain the physical address of a row $down to the specific block+ and allow one to retrieve the row in a sin%le block access. & as lon% as a row is not deleted , its rowid remains unchan%ed. & in 10?.TE5E* tables , rows in different tables that are in the same data block can have the same rowid. & a deleted row3s rowid can be reused by a transaction which is other than the transaction that deleted the row.

=O5B/Ts O= @H.(1/0 5OE(* ######################### EITEN*E* 5OE(* &' & format supports tablespace relative data block addresses & efficiently identifies rows in partitioned tables and indexes as well as non&partitioned tables and inde . & tables and inde es created by an Oracle :i $or hi%her+ server always have e tended row&ids. & e tended rowids use a base F; encodin% of the physical address for each row selected. The encodin% characters are : /&J , a&C , 8&K ,, and ). =or e ample, the followin% >uery: .E0E1T 5OE(*, 0/.TLN/BE =5OB EB@0OHEE. EHE5E *E@/5TBENTL(*#68M &&& can return:
ROWID -----------------AAAAaoAATAAABrXAAA AAAAaoAATAAABrXAAE AAAAaoAATAAABrXAAG AAAAaoAATAAABrXAAN LAST_NAME ---------BORTINS RUGGLES CHEN BLUMBERG

/n e tended row id has a four&piece format, OOOOOO &' the Ndata ob,ect n-mberO that identifies the database se%ment $////ao in this e ample+. schema obDects in the same se%ment, such as the cluster of tables, have the same data obDect number. === &' the tablespace&relative Ndata ile n-mberO of the datafile that contains the row $file //T in the e ample+. """""" &' the Ndata blockO that contains the row $block ///"rI in the e ample+. "lock numbers are relative to their datafile, not tablespace. Therefore, two rows with identical block numbers could reside in two different datafiles of the same tablespace.

555

&' the NrowO in the block

N*"B.L5OE(*O can be used to obtain the obDectLid for a correspondin% e tended rowid or to convert a rowid from e tended format to restricted format $vice versa+. 5E.T5(1TE* 5OE(* &' use a binary representation of the physical address for each row selected. Ehen >ueried usin% .P0Q @lus, the binary representation is converted to a 4/51H/56)he adecimal representation. E ample:
SELECT ROWID, last_name FROM employees WHERE department_id = 30;

can return the following row information:


ROWID ENAME -----------------00000DD5.0000.0001 00000DD5.0001.0001 00000DD5.0002.0001 ---------KRISHNAN ARBUCKLE NGUYEN

/s shown, a restricted rowid3s 4/51H/56)he adecimal representation is in a three&piece format, block.row.file: */T/ "0O12: **7 G block numbers are relative to their datafile, not tablespace. Two rows with identical block numbers could reside in two different datafiles of the same tablespace. 5OE :8,-,6 & row numbers of a %iven block always start with 8. */T/=(0E :

5E.T5(1TE* 5OE(* &' is available for backward compatibility with applications developed with Oracle *" version < or earlier releases.

You might also like