-
ALTER INDEX REBUILD drops statistics ...
Oracle 8.1.7.3.50 EE/MVS
Hi,
After Rebuilding the Indexes
the LAST_ANALYZED-Attribute is set to NULL,
The Statistics for the index is gone.
Problem is that the CBO goes grazy with indexes when
no statistics is available ( FULL-TABLE-SCANS ).
Is there a trick to rebuild the index without dropping the old statistics ( till a new gather of stats ) ?
Orca
-
No trick I'm afraid, after you've performed the rebuild you need to re-analyze the index to populate the stats. As far as I'm aware there is no way to retain the old stats.
Regards
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
well you can either export index stats (use dbms_stats.EXPORT_INDEX_STATS) before rebuild then import back (dbms_stats.IMPORT_INDEX_STATS) which takes seconds of time or rebuild with estimate or compute statistics clause
alter index emp_pk rebuild compute statistics;
-
Originally posted by pando
well you can either export index stats (use dbms_stats.EXPORT_INDEX_STATS) before rebuild then import back (dbms_stats.IMPORT_INDEX_STATS) which takes seconds of time or rebuild with estimate or compute statistics clause
alter index emp_pk rebuild compute statistics;
Thanks pando, this is exactly what i searched
Orca
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|