DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Questions on dbms_stats.gather_schema_stats

  1. #1
    Join Date
    Mar 2005
    Posts
    3

    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.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    exact command used?

  3. #3
    Join Date
    Dec 2001
    Location
    Tel-Aviv,Israel
    Posts
    233
    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

  4. #4
    Join Date
    Mar 2005
    Posts
    3
    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
  •  


Click Here to Expand Forum to Full Width