[ Pobierz całość w formacie PDF ]
.For each data and index segment, Oracle maintains one or more free lists listsof data blocks that have been allocated for that segment s extents and have free2-8 Oracle8 Server Concepts space greater than PCTFREE; these blocks are available for inserts.When youissue an INSERT statement, Oracle checks a free list of the table for the firstavailable data block and uses it if possible.If the free space in that block is notlarge enough to accommodate the INSERT statement, and the block is at leastPCTUSED, Oracle takes the block off the free list.Multiple free lists persegment can reduce contention for free lists when concurrent inserts takeplace.After you issue a DELETE or UPDATE statement, Oracle processes thestatement and checks to see if the space being used in the block is now less thanPCTUSED.If it is, the block goes to the beginning of the transaction free list,and it is the first of the available blocks to be used in that transaction.Whenthe transaction commits, free space in the block becomes available for othertransactions.Availability and Compression of Free Space in a Data BlockTwo types of statements can increase the free space of one or more data blocks:DELETE statements, and UPDATE statements that update existing values tosmaller values.The released space from these types of statements is availablefor subsequent INSERT statements under the following conditions:" If the INSERT statement is in the same transaction and subsequent to thestatement that frees space, the INSERT statement can use the spacemade available." If the INSERT statement is in a separate transaction from the statementthat frees space (perhaps being executed by another user), the INSERTstatement can use the space made available only after the othertransaction commits, and only if the space is needed.Released space may or may not be contiguous with the main area of free spacein a data block.Oracle coalesces the free space of a data block only when (1)an INSERT or UPDATE statement attempts to use a block that containsenough free space to contain a new row piece, and (2) the free space isfragmented so that the row piece cannot be inserted in a contiguous section ofthe block.Oracle does this compression only in such situations, becauseotherwise the performance of a database system would decrease due to thecontinuous compression of the free space in data blocks.Row Chaining and MigratingIn two circumstances, the data for a row in a table may be too large to fit intoa single data block.In the first case, the row is too large to fit into one datablock when it is first inserted.In this case, Oracle stores the data for the row ina chain of data blocks (one or more) reserved for that segment.Row chainingData Blocks, Extents, and Segments 2-9 most often occurs with large rows, such as rows that contain a column ofdatatype LONG or LONG RAW.Row chaining in these cases is unavoidable.Note: The format of a row and a row piece are described in  Row Format andSize on page 7-5.However, in the second case, a row that originally fit into one data block isupdated so that the overall row length increases, and the block s free space isalready completely filled.In this case, Oracle migrates the data for the entirerow to a new data block, assuming the entire row can fit in a new block.Oraclepreserves the original row piece of a migrated row to point to the new blockcontaining the migrated row; the ROWID of a migrated row does not change.Note: For more information about ROWID, see  ROWID Datatype onpage 9-11.When a row is chained or migrated, I/O performance associated with this rowdecreases because Oracle must scan more than one data block to retrieve theinformation for the row.For information about reducing chained andmigrated rows and improving I/O performance, see Oracle8 Server Tuning.ExtentsAn extent is a logical unit of database storage space allocation made up of anumber of contiguous data blocks.One or more extents in turn make up asegment.When the existing space in a segment is completely used, Oracleallocates a new extent for the segment.When Extents Are AllocatedWhen you create a table, Oracle allocates to the table s data segment an initialextent of a specified number of data blocks.Although no rows have beeninserted yet, the Oracle data blocks that correspond to the initial extent arereserved for that table s rows.If the data blocks of a segment s initial extent become full and more space isrequired to hold new data, Oracle automatically allocates an incremental extentfor that segment.An incremental extent is a subsequent extent of the same orgreater size than the previously allocated extent in that segment.(The nextsection explains the factors controlling the size of incremental extents.)For maintenance purposes, the header block of each segment contains adirectory of the extents in that segment [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • agnieszka90.opx.pl