-
Questions on dbms_stats.gather_schema_stats
Hi, all: I have been using dbms_utility.analyze_schema to collect stats. I know Oracle recommends using dbms_stats pkg. So, I tried it today. Here is the weird thing, after I used dbms_stats.gather_schema_stats, i queried user_tables and user_indexes. the last_analyzed column for user_tables were updated, but for user_indexes, the column is not updated. I also used gather_table_stats, same thing, it only updated user_tables, but not user_indexes. Anybody has the same experience? I am using Oracle 9.2.0.5 on aix 5.2. I only used schema_name as the parameter for gather_schema_stats.
Thanks
jw
p.s. if I use dbms_utility.analyze_schema, both user_tables and user_indexes are updated.
-
-
Try to run the following syntax:
EXECUTE dbms_stats.gather_schema_stats(
ownname => 'Username',
method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO',
cascade=>TRUE);
Nir
-
Thanks for the replies. That cascade parameter fixed it.
Thanks
jw
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
|