Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Effects of framentation
> How can I do that? How can I prove that queries answer too slow
> because of the fragmentation.
You won't be able to prove this because the premise is false. Fragmentation does not cause query slowness. In fact, if you are using Locally Managed Tablespaces, then fragmentation is not only possible, it is almost 100% likely for some of the segments in the tablespace.
In many systems, it is common for a query that ran fine in the beginning to become slow over time. In the beginning, many people don't notice it becoming slower and slower. But one day, everyone starts complaining about how the query is now slow. This is a common performance scenario. In reality, the query was not executed properly enough to scale as the data grows.
If your queries are slow, then there are two things you need to concentrate on:
Concentrating on fragmentation of the database segments will not solve your problem. If you do manage to defragment the database segment and your query does perform better, then I would argue that there are other contributing factors at work that have nothing to do with fragmentation but were fixed when you defragmented. For instance, you could have tons of migrated rows. These migrated rows can cause performance problems. In the process of defragmenting, your rows were no longer migrated thereby fixing your problem. Or, you could have had old, stale CBO statistics and after you defragmented, you calculated new statistics. Or, you could have indexes that need rebuilding (rare, but it happens) and after you defragmented, you rebuilt the index and that solved your performance problem.
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_remove_spam.peasland.com Remove the "remove_spam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three"Received on Wed Jan 28 2004 - 09:53:52 CST