I analyze my tables once a week every sunday night.
basically there is no activity on the database after that till monday morning.
I also have events scheduled in my OEM to alert me if any of the indexes need to be rebuild and I still get alerts immediatly after the whole schema has been anaysed.
Periodic reindexing will recover space (especially if you update the base table frequently). Updates force the index to create new leaf blocks, and the old ones just don't get recycled or deleted.
I've realized significant performance increases by rebuilding indexes. However, it's not something you want to do weekly. We do it once a year or as needed .. that seems to be enough.
Analyzing your table will provide more accurate statistics for the cost based optimizer.
Originally posted by KenEwald
Periodic reindexing will recover space (especially if you update the base table frequently). Updates force the index to create new leaf blocks, and the old ones just don't get recycled or deleted.
I've realized significant performance increases by rebuilding indexes. However, it's not something you want to do weekly. We do it once a year or as needed .. that seems to be enough.
Analyzing your table will provide more accurate statistics for the cost based optimizer.
-Ken
What exactly is the difference between analyzing and rebuilding indexes.
As KenEwald pointed out, rebuilding your indexes reshuffles your leaf nodes and removes any leaf nodes that are empty. I usually rebuild indexes after a large number of rows has been deleted or the height gets really large.
Analyze will compute statistics on your data to help the optimizer choose the best execution method. You should analyze your tables whenever the data distribution changes drastically.
Bookmarks