FRAGMENTATION_STATUS

Hi All,
I got this query in ur blog for 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 Frag','' ) ),'Possible Honey Comb Frag')
fragmentation_status FROM dba_free_space_coalesced dfsc ORDER BY dfsc.tablespace_name;
and output is as follows
TABLESPACE_NAME FRAGMENTATION_STATUS
XNSX No Frag
XTRD No Frag
XTRX No Frag
XXLODD
XXLODX No Frag
ZFAD No Frag
ZFAX No Frag
i want to know what is the meaning of No Frag and the blank in TABLESPACE_NAME XXLODD
Please help me.
thanks in advance.

NBOSS wrote:
Hi All,
I got this query in ur blog for FRAGMENTATIONI don't know who ur is or why he has a blog, and I don't know what FRAGMENTATION is. Though I do know that many people worry about something they think is fragmentation and it isn't and it doesn't make any performance difference.
What exactly are you trying to discover here?
>
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 Frag','' ) ),'Possible Honey Comb Frag')
fragmentation_status FROM dba_free_space_coalesced dfsc ORDER BY dfsc.tablespace_name;
and output is as follows
TABLESPACE_NAME FRAGMENTATION_STATUS
XNSX No Frag
XTRD No Frag
XTRX No Frag
XXLODD
XXLODX No Frag
ZFAD No Frag
ZFAX No Frag
i want to know what is the meaning of No Frag and the blank in TABLESPACE_NAME XXLODD
Please help me.Please help us help you. Are you using LMT tablespaces? What version (exactly, show us the banner) are you on?
It is entirely possible the help you need is "this is leftover from the olden days and misleading."

Similar Messages

  • Removing Tablespace fragmentation in 10g

    i have a problem with a tablespace space that is highly fragmented . It's locally managed with PCT_INCREASE set to 0. How can i reduce the fragmentation in this tablepsace
    Free/Used Space Report :
    Tablespace                        Used MB    Free MB   Total MB  Pct. Free
    FRP_I01                            158556      44625     203181         22
    select PCT_INCREASE,EXTENT_MANAGEMENT,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces where TABLESPACE_NAME='FRP_I01';
    PCT_INCREASE EXTENT_MAN SEGMEN
               0 LOCAL      AUTO
    fragmentation report :
    select
      2  tablespace_name,
      3  count(*) free_chunks,
    decode(
      4    5  round((max(bytes) / 1024000),2),
      6  null,0,
      7  round((max(bytes) / 1024000),2)) largest_chunk,
      8  nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
      9  0) fragmentation_index
    10  from
    11  sys.dba_free_space
    12  group by tablespace_name
    13  having tablespace_name='FRP_I01'
    14  order by
    15  2 desc, 1;
    TABLESPACE_NAME                FREE_CHUNKS LARGEST_CHUNK FRAGMENTATION_INDEX
    FRP_I01                                201         11904               13.56
    SELECT   dfsc.tablespace_name tablespace_name,
      2           DECODE (
      3              dfsc.percent_extents_coalesced,
                100,
      4    5              (DECODE (
      6                  GREATEST ((SELECT COUNT (1)
      7                               FROM dba_free_space dfs
      8                              WHERE dfs.tablespace_name = dfsc.tablespace_name), 1),
      9                  1,
    10                  'No Frag',
    11                  'Bubble Frag'
    12               )
    13              ),
    14              'Possible Honey Comb Frag'
    15           )
    16                 fragmentation_status
    17      FROM dba_free_space_coalesced dfsc
    18  where dfsc.tablespace_name='FRP_I01'
    19  ORDER BY dfsc.tablespace_name;
    TABLESPACE_NAME                FRAGMENTATION_STATUS
    FRP_I01                        Bubble Frag

    yes, i know that. But as per my script this particular tablespace is fragmented and i want to know if some1 can help me out how to defragment it ?
    A 100% score indicates no fragmentation at all. Lesser scores verify the presence of fragmentation.The free chunks count column will tell you how many segments of free space are scattered throughout the tablespace.
    thanks in advance

  • A Nice Audit Script

    Hi,
    I am trying to build yet an other database audit script. Actually my db target are 9i/10g. The goal is to tell if the database respect some standard and good basics practice. I want to be able to parse the result because it have to run on many databases.
    - Any suggestions or remarks are welcome
    - your scripts (or link to some url) will be tested and welcome
    - I may provide you the source script when it will be advanced.
    - You may note that i was inspired for the beginning on a script in www.dba-village.com
    The actual defined rules are following :
    Instance     hiddens parameters
         Events valuated in init.ora
         Spfile unused
         Having no Jvm and Java Pool not set to 0
    Difference with v$parameter and spfile
    Database     Control file name not following rule name
         Datafile not folliowing rule name
         Redo logs file name not following rule name
         Archivelog file name not following rule name
         Spfile file name not following rule name
         Directories udump, bdump, cdump not following rule name
    Tablespace     Tablespace having extents no multiple of db_bloxk_size *db_file_multiblock_read_count
         Tablespace having data and index
         Tablespacfe dictionnary managed
         Tablespace not having uniform extent
         Tablespace empty
         None temporary segment in temporary tablespace
         MaxExtent of system tablespace
    Role     Dangerous Role granted
    Privilege     Dangerous Privilege Granted
         System user granted on object to application user
         non system user granted to system schema
    Schema     Samples schema installed
    Segment      Non system segment in tablespace sysaux
         Non system segment in tablespace system
         Lob not in specific tablespace
    Objects     Objects having blank in name
         Columns having blank in name
    Datafile     Datafile in autoextend mode
         Datafile in autoextend mode without maximum
    Schema     Samples schema installed
         User having objects with name like "SYS%'
         User having not default tablespace
         User having not temporay tablespace
    Statistics      Statistics with different date on same schema
         Schema without Statistics
    Table     Big table, with statistic without index
         Big table, without statistics without index
         Table > 10 go with statistic unpartionned
         Table > 10 go without statistic unpartionned
         Table having more than two unique index
         Little table with statistic having index
         Little table without statistic having index
    Index     Index having constraint disabled
         Little table with statistic having index
         Analyzed table but not analyzed index
    synonym     Phantom synonym
    Data     Type used long, long raw, and char
    The actual Draft (1st result) is following :
    -- Instance Information --
    Cpu_Count 2 | Host_Name CBID5000133
    Instance_Name puma | Database_Status ACTIVE
    Status OPEN | Startup_Time 02-08-2007 10:14
    Version 10.2.0.3.0 | Instance_Role PRIMARY_INSTANCE
    Database log mode ARCHIVELOG
    Background Dump Dest C:\ORACLE\ADMIN\PUMA\BDUMP
    Spfile C:\ORACLE\10.2.0\DATABASE\SPFILEPUMA.ORA
    -- Database Space (Mb) 1073 | SGA (Mb) 276 --
    -- Nb. Datafiles 5 | Nb. Tempfiles 1 --
    Data Buffer Hit ratio 96,0 | Library Buffer Hit ratio 99,9
    Dict. Buffer Hit ratio 81,0 | Switch number (last hour) 0
    Session number 4 | Active session number 4
    Redo size (Kb) 51200
    Dba_Tablespaces Status OK | V$Log Status OK
    V$Datafile Status OK | V$Tempfile Status OK
    V$Recover_File OK | V$Recovery_Log OK
    Lock number 0 | Indexes unusable 0
    Tablespace in Backup Mode 0 | Tablespace > 90% 3
    Jobs Broken 0 | Objects Invalid 0
    Shared_Pool Failure 0 | Latch > 1% 5
    Trigger Disabled 16 | Constraint Disabled 27
    -- More Instance Information --
    07_dictionnary_accessibility FALSE Db_Keep_Cache_Size 0
    Compatible 10.2.0.3.0 Db_Block_Size 8192
    Created 31-07-2007 14:03 Logins ALLOWED
    Cursor_Sharing EXACT Sort_Area_Size 65536
    Db Name PUMA Dbid 3523213029
    Db_Cache_Advice ON Db_File_Multiblock_Read_Count 8
    Db_Cache_Size 0 Open_Cursor 300
    Db_Domain Null Db_Unique_Name puma
    Log_Archive_Format ARC%S_%R.%T Remote_Login_PasswordFile EXCLUSIVE
    Open_Mode READ WRITE Logins ALLOWED
    Processes 150 Pga_Aggregate_Target 95420416
    Sga_Target 289406976 Sga_Max_Size 289406976
    Shared_Pool 0 Java_Pool_Size 0
    Statistics_Level TYPICAL Job_Queue_Processes 10
    Undo_Management AUTO Undo_Retention 900
    Undo_Tablespace UNDOTBS1 Nls_Character_Set WE8MSWIN1252
    -- Tablespaces --
    % Largest
    Alloc Used Free Used Nb Free % Ext. Ext. Auto
    Content Tablespace Name (Mb) (Mb) (Mb) Space frag Ext.(Mb) Coal. M. Ext.
    PERMANENT SYSTEM 480 472 8 98.3 2 7.9 100 LOCAL Yes
    SYSAUX 240 234 6 97.7 14 4.8 100 LOCAL Yes
    EXAMPLE 100 77 23 77.4 3 19.8 100 LOCAL Yes
    USERS 5 3 2 65.0 1 1.8 100 LOCAL Yes
    sum 825 787 38 20
    TEMPORARY TEMP 20 20 0 100.0 LOCAL Yes
    sum 20 20 0
    UNDO UNDOTBS1 30 30 0 99.4 3 .1 100 LOCAL Yes
    sum 30 30 0 3
    Tablespace Fragmentation Details
    Tablespace FRAGMENTATION_STATUS
    EXAMPLE Bubble Frag
    SYSAUX Bubble Frag
    SYSTEM Bubble Frag
    UNDOTBS1 Bubble Frag
    USERS No Frag
    * Fragmentation Summary
    Database total size: 855MB
    Fragmentation total size: 0MB,
    that is 0% of total
    Table fragmentation size: 0MB,
    that is 0% of total
    Index fragmentation size: 0MB,
    that is 0% of total
    * Table Fragmentation Summary by Tablespaces
    aucune ligne sélectionnée
    * Index Fragmentation Summary by Tablespaces
    aucune ligne sélectionnée
    ============================================================================================
    OBJECTS FOR REORGANISATION
    ============================================================================================
    * This script reports the table that is highly fragmented
    ============================================================================================
    ALL OBJECTS WITH NUMBER OF EXTENTS > 500 (except temporary and rollback segments)
    ============================================================================================
    ============================================================================================
    ALL TABLES WITH PERCENTAGE OF CHAINED ROWS > 0.1% (acceptable < 3%)
    ============================================================================================
    ============================================================================================
    ALL TABLES WITH FREESPACE/BLOCK > 2*PCTFREE
    ============================================================================================
    ============================================================================================
    ALL TABLES WITH PERCENTAGE OF EMPTY BLOCKS (ABOVE HWM) > 50% (waisted space)
    ============================================================================================
    ============================================================================================
    display the table name and column name of the tables that need to be indexed
    ============================================================================================
    TABLE_NAME CONSTRAINT_NAME TABLE_TO_BE_INDEXED COLUMN_TO_BE_INDEXED
    CHANNELS COSTS_CHANNEL_FK COSTS CHANNEL_ID
    PROMOTIONS COSTS_PROMO_FK COSTS PROMO_ID
    REGIONS COUNTR_REG_FK COUNTRIES REGION_ID
    COUNTRIES CUSTOMERS_COUNTRY_FK CUSTOMERS COUNTRY_ID
    EMPLOYEES DEPT_MGR_FK DEPARTMENTS MANAGER_ID
    ============================================================================================
    lists foreign keys that are missing indexes
    on the foreign key columns in the child table. If the index is not in place
    share lock problems may occur on the parent table
    ============================================================================================
    Missing Index
    HR-> COUNTR_REG_FK(REGION_ID[1]) ***** Missing Index
    HR-> DEPT_MGR_FK(MANAGER_ID[1]) ***** Missing Index
    SH-> COSTS_CHANNEL_FK(CHANNEL_ID[1]) ***** Missing Index
    SH-> COSTS_PROMO_FK(PROMO_ID[1]) ***** Missing Index
    SH-> CUSTOMERS_COUNTRY_FK(COUNTRY_ID[1]) ***** Missing Index
    -- xx. Objects having blank in name --
    Rule xx - MICKY TABLE "test blank"
    -- xx. Empty tablespaces
    Rule xx - Tablespace MICKY_02 vide
    Rule xx - Tablespace MICKY_03 vide
    Rule xx - Tablespace MICKY_04 vide
    Rule xx - Tablespace MICKY_05 vide
    -- xx. Analyzed index but not analyzed table
    Rule xx Index SYS_IL0000052024C00022$$ not analyzed but table CUSTOMERS is.
    Rule xx Index SYS_IL0000052024C00023$$ not analyzed but table CUSTOMERS is.
    Rule xx Index SYS_IL0000052024C00022$$ not analyzed but table CUSTOMERS is.
    Rule xx Index SYS_IL0000052024C00023$$ not analyzed but table CUSTOMERS is.
    -- xx. Dangerous Privilege Granted
    Rule xx -> Grantee PRIVILEGE ADM
    Rule xx SCHEDULER_ADMIN CREATE ANY JOB YES
    Rule xx WMSYS UNLIMITED TABLESPACE NO
    Rule xx XDB UNLIMITED TABLESPACE NO
    Rule xx OLAP_DBA CREATE ANY TABLE NO
    Rule xx OLAP_DBA LOCK ANY TABLE NO
    Rule xx OLAP_DBA ALTER ANY DIMENSION NO
    -- xx. Table name and column name of the tables that need to be indexed
    Rule xx -> TABLE_NAME CONSTRAINT_NAME TABLE_TO_BE_INDEXED COLUMN_TO_BE_INDEXED
    !Rule xx CHANNELS COSTS_CHANNEL_FK COSTS CHANNEL_ID
    !Rule xx PROMOTIONS COSTS_PROMO_FK COSTS PROMO_ID
    !Rule xx REGIONS COUNTR_REG_FK COUNTRIES REGION_ID
    !Rule xx COUNTRIES CUSTOMERS_COUNTRY_FK CUSTOMERS COUNTRY_ID
    !Rule xx EMPLOYEES DEPT_MGR_FK DEPARTMENTS MANAGER_ID

    Hi, for Oracle 10g you can use the Oracle Policy for custom alerts, then you can monitoring the database from Oracle Database Control.
    Regards.

  • Checking Tablespace Fragmentation...

    Folks,
    Can someone share a high-end script for Checking Tablespace Fragmentation that shows exact numbers/values?
    The one I have shows only yes or no..
    Pasting my script below:
    Prompt Fragmentation Level in the db
    Prompt
    TTitle left "*** Fragmentation Level in the db (As of:"xdate ") from mtdb" skip2
    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 Frag',
    'Fragmented'
    'Possible Honey Comb Frag'
    fragmentation_status
    FROM dba_free_space_coalesced dfsc
    ORDER BY dfsc.tablespace_name
    ttitle off
    results:
    TABLESPACE_NAME FRAGMENTATION_STATUS
    IIS_TABS1 No Frag
    IIS_TABS2 No Frag
    IIS_TABS3 Fragmented
    IIS_TABS4 No Frag
    IIS_TABS5 No Frag
    regards,
    Lily

    Can you explain what, exactly, you mean by "tablespace fragmentation"? Assuming you are on a recent version of Oracle and using locally managed tablespaces (LMT's), fragmentation in the sense of having a chunk of space on disk that cannot be reused because it is too small is all but impossible. Technically, it is still possible in a LMT with automatic rather than uniform extent allocation, but it is exceptionally difficult in practice to come up with such a scenario.
    Tablespace fragmentation was a potential problem in long-ago days when there were dictionary-managed tablespaces (DMT's) when individual objects could have different extent allocation policies and PCTINCREASE could be specified. The solution back then was to set INITIAL = NEXT = <<some reasonable constant>> and PCTINCREASE = 0 and simulate the uniform extent allocation option of LMTs.
    Justin

  • Fregmentation on LMTs!!!

    Hi All,
    If this query is OK..then why fregmentation happens on LMTs..as it is almost impossible on LMT..
    mostly INDEX tablespaces have fregmentation so as to some data tablespaces..
    why is it so?
    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 Frag',
    'Fragmented'
    fragmentation_status
    FROM dba_free_space_coalesced dfsc
    ORDER BY dfsc.tablespace_name
    TABLESPACE_NAME FRAGMENTATION_STATUS
    DRSYS No Frag
    FIN_DATA Fragmented
    FIN_IDX Fragmented
    INDX Fragmented
    INV_DATA No Frag
    INV_IDX Fragmented
    OTHER_DATA Fragmented
    OTHER_IDX No Frag
    PAY_DATA Fragmented
    PAY_IDX Fragmented
    SALE_DATA Fragmented
    SALE_IDX Fragmented
    SYSTEM No Frag
    TESTDATA Fragmented
    UNDOTBS1 Fragmented
    USERS Fragmented
    XDB No Frag
    Thanx in Advance!!!
    ORA 9.2/WIN 2K SERVER

    Hi,
    In addition, take a look on this thread below:
    Checking Tablespace Fragmentation...
    Cheers

Maybe you are looking for

  • Wrong posting in Inventory and GR/IR

    Hi , I was simulating a case where I did created a PO of 20Pcs @ 100/ Pc Created a MIGO with 10 pcs , Accounting entry posted are                            1000 Inventory                          -1000 GR/IR Supplier send me the Invoice of full PO q

  • FEATURE REQUEST: Sticky editing of feed info

    I love iTunes 6 on Windows as pod-catching software. It's great. But a minor feature request.... (since I don't see anywhere else on Apple.Com for iTunes feature requests, I'm posting it here). Most podcast authors seem to do a lousy job of creating

  • Sort messages in Mavericks Mail

    Hello, I upgraded from Snow Leopard directly to Mavericks. With respect to the previous version of Mail, I find the following functions not easily accessed as before. In a work environment this means wasting more time to do the same thing. 1) There i

  • Silent Startup

    Is there anyway to silently start the Mac (Powerbook G4) (in case people are sleeping, or I am at the library etc.) WITHIN the operating system? (WITHOUT installing third party software) What is the best way to submit this this and other ideas to dev

  • IOCTL for keyboard IO Solaris 10 and Solaris 8

    Do you know what has chaned for keyboard io via solaris 8 and solaris 10 update 5? Here is the story. I have a solaris binary work fine in solaris 8. It remaps the keyboard input (most probably using ioctl) according to some table it has (actually a