Monday 25 June 2018

Tablespace fragmentation

Summary 
Use the following script to find if some tablespaces have fragmentation.

SELECT   dfsc.tablespace_name tablespace_name,
         DECODE (dfsc.percent_extents_coalesced,100,
(DECODE (GREATEST ((SELECT COUNT (1)
FROM dba_free_space dfs
WHERE dfs.tablespace_name = dfsc.tablespace_name), 1), 1, 'No Fragmentation',
'Bubbles, No Fragmentation')), 'Possible Honey Comb, No Fragmentation') fragmentation_status
    FROM dba_free_space_coalesced dfsc
ORDER BY dfsc.tablespace_name;


One simple solution to avoid fragmentation is creating all tablespaces with the same uniform extent size.




Source : Internet

No comments:

Post a Comment