I am having performance problems with my database. How can I tell if my tablespace has excessive fragmentation. The tablespace uses only a single datafile with autoextend on. The datafile is stored on a raid-5 level disk.
What storage clause you have used at the time creating tablespace/datafile and what was your database block_size and tablespace size ?
Do you have segment level storage clause or not ?
I do have little big script which give little map kinda picture for extents. If you are interested probably I will e-mail you.
If you are using OEM you can use, tablespace map to see how your tablespace extents spread across files.
[Edited by sreddy on 01-22-2001 at 06:50 PM]
Can you give is more information on the storage parameters you are using.
Then some one can help you.
How does the storage parameter affect the degree of tablespace fragementation? Thanks!
try analyzing this posting and read the tech. white paper on fragmentation.
Are you sure that the performance problems are not due to the fact that it is a RAID 5 disk?
AFAIK, Oracle only recommends RAID-0 or RAID-0+1 if RAID is used.
[Edited by Dave_A on 02-02-2001 at 09:30 AM]
RAID 5 is suitable for sequential access. It is better to know your application type (OLTP / Datawarehouse), before you change the RAID level.
If the PCTINCREASE value for the tablespace is set to 0, then you need to manually coalesce the tablespace for defragmentation.
rem file: tabspfrag.sql
rem Created By: Vitaliy Mogilevskiy (email@example.com)
rem Note: This script is from Kevin Loney "ORACLE8 DBA Handbook"
rem This script measures the fragmentation of free space
rem in all of the tablespaces in the database and scores them
rem according to an arbitrary index for comparison
rem largest extent 100
rem FSFI = 100 * sqrt(------------------) * (-------------------------------)
rem sum of all extents sqrt(sqrt((number of extents)))
rem FSFI - Free Space Fragmentation index
rem The largest possible FSFI (for an ideal single-file tablespace) is 100
rem As the number of extents increases, the FSFI rating drops slowly. As the size of
rem the largest extent drops, however, the FSFI rating drops rapidly.
rem After running this script look at the rating number -- if < 30 then run
rem s_tabsp_detail.sql (see tabsp_detail.sql)
set newpage 0
set pages 60
col fsfi format 999.99
, sqrt(max(blocks)/sum(blocks)) *
group by tablespace_name
order by 1
Back to the root of the original question: "I have performance problems, is this due to the fragmentation?"
The question should be a litle more accurate, for example what is the manifestation of this performance problems, but the answer (with about 99.999% accuracy) is: NO, the fragmentation is not a source of your performace problems. Not anywhere near.
Fragmentation has practicaly (read this as "absolutely") no effect on performace in the real life if the extents are sized correctly. But even if they aren't, the performance degradation because of the fragmentation is barely noticable. Segment fragmentation is not an isue, it is only a DBA mith from the old days and a source of great profits for producers of expencive reorg tools.
If you can show me the facts that fragmentation is realy cousing performance degradation I'll show you that there is something very wrong with your aplication design or that your SQLs need some tuning (of, cource, there are allways exception to the rule...).
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Click Here to Expand Forum to Full Width