DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Fragmentation in Rule Based Optimizer !!

  1. #1
    Join Date
    Nov 2002
    Posts
    170

    Fragmentation in Rule Based Optimizer !!

    Can someone tell me how to check for Fragmented Tables/Indexes for RULE Based Optimizer. Even though Oracle Tells that Locally managed tables/indexes doesn't get fragmented I don't agree. I have had situations when I see some query doesn't perform well and after I perform either move or export/import etc.. on the specific table or Index it works fine. Since my Database is in RULE based as per the requirement from the Application I have not been able to diagnose which table/index is fragmented. Can someone help me with a procedure/process or script to distinguish Fragmented objects.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Maybe because the move/rebuild has cached the blocks that the query is going to read?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    or your pctfree settings are not so good so you are migrating a number of rows increasing your I/O.

    Whats RULE got to do with finding fragmented objects anyway?

  4. #4
    Join Date
    Nov 2002
    Posts
    170
    Originally posted by davey23uk
    Whats RULE got to do with finding fragmented objects anyway?
    For COST Based Optimizer.

    1.) analyze index index_name validate structure
    2.) select name NAME,
    (br_rows_len*100)/(br_blk_len*br_blks) BRANCH_UTILIZATION,
    ((lf_rows_len - del_lf_rows_len)*100)/ (lf_blk_len*lf_blks) LEAF_UTILIZATI,
    decode (sign(ceil(log(br_blk_len/(br_rows_len/br_rows),
    lf_blk_len/((lf_rows_len - del_lf_rows_len)/(lf_rows - del_lf_rows)
    +1 - height), -1,'YES','NO') CAN_REDUCE_LEVEL
    from index_stats;


    This will give you the candidate index for defragmentation.

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by dbasupuser
    For COST Based Optimizer.

    1.) analyze index index_name validate structure
    2.) select name NAME,
    (br_rows_len*100)/(br_blk_len*br_blks) BRANCH_UTILIZATION,
    ((lf_rows_len - del_lf_rows_len)*100)/ (lf_blk_len*lf_blks) LEAF_UTILIZATI,
    decode (sign(ceil(log(br_blk_len/(br_rows_len/br_rows),
    lf_blk_len/((lf_rows_len - del_lf_rows_len)/(lf_rows - del_lf_rows)
    +1 - height), -1,'YES','NO') CAN_REDUCE_LEVEL
    from index_stats;


    This will give you the candidate index for defragmentation.
    And what has all this to do with COST/RULE based optimizer?

    Morover, I suggest you to search the web for some decent whitepapers dealing with "Oracle fragmentation mith". You'll learn a lot from them and you'll never again ask such a silly question about segment fragmentation again.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  6. #6
    Join Date
    May 2002
    Location
    Western Australia
    Posts
    233
    Why don't you run a statspack for the bad and the good and then compare to see why you're getting the "ugly".

    No point in blaming fragmentation if you can't prove it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width