gaqchrome.blogg.se

Oracle 10g tablespace fragmentation
Oracle 10g tablespace fragmentation








oracle 10g tablespace fragmentation oracle 10g tablespace fragmentation

When you consider the possible scenarios that have to be addressed with data inserts, updates and deletes, you realise how difficult it can be for Oracle to write code that handles free space management at the block level in a timely and efficient manner you also realise how difficult it can be (as a developer or DBA) to specify sensible space management limits to minimise performance problems in extreme cases. When you create a table you specify how much space should be left in each block for rows to be updated and (explicitly under freelist management or implicitly under ASSM) how much space should become free in a block before it should be considered as a target for new data to be inserted. The more significant, and common, type of table fragmentation comes about because data can be deleted and then we can worry about “sparsely populated blocks”.

oracle 10g tablespace fragmentation

This doesn’t really matter very much in general because (a) most I/O access is by block rather than tablescan so the location within extent doesn’t really matter much (b) the “messiness” is generally restricted to just the last extent in the table and (c) if you are doing tablescans Oracle has a mechanism dependent on using the “ LHWM (low high water mark) and HHWM (high high water mark), for minimising the overhead of checking which 16 block chunks need special treatment. This means you could create a table in a tablespace using 1MB uniform extents and find that the first row you inserted formatted the last 16 blocks of the first extent and the row went into the last block of that extent. The location of the chunk, like the initial choice of block to use, is dictated by the process id ( pid). The location of those 16 blocks may be almost anywhere in the extent (limited by the fact that the starting point within the extent has to be based on multiples of 16). When a process checks the freespace bitmaps for an object and can’t find a block with enough free space for inserting new data, it will make some space available by formatting 16 blocks somewhere in the current extent (allocating a new extent if necessary). Here’s a funny thought – ASSM (automatic segment space management) introduces another form of table fragmentation that usually doesn’t matter. In the introduction we discussed one type of table fragmentation that doesn’t (usually) matter – the fragmentation of a table into multiple extents. Introduction – with links to parts 2 – 4.This note is part three of a four-part series, and covers Table fragmentation.










Oracle 10g tablespace fragmentation