ANALYZE TABLE
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: ANALYZE TABLE

  1. #1
    Join Date
    Jun 2001
    Posts
    243
    If I run ANALYZE TABLE table_name COMPUTE STATISTICS;
    am I analyzing indexes also?...how about indexed columns?

    or do I need to run following command along with the first one?

    ANALYZE TABLE table_name COMPUTE STATISTICS FOR ALL INDEXES

    ANALYZE TABLE table_name COMPUTE STATISTICS FOR ALL INDEXED COLUMNS

    If I want to have complete analyze on tables, indexes, and etc.... which command should I use?

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    You should analyze the indexes separately.
    To analayze all indexes in a given schema, run the following:

    exec sys.dbms_utility.analyze_schema ('OWNER','COMPUTE',NULL,NULL,'FOR ALL INDEXES')



  3. #3
    Join Date
    Sep 2001
    Posts
    112
    I thought that analyzing the tables also analyzed the indexes. For all indexes only analyzes the index.

    I only analyze my tables so I hope im not suffering a performance hit because of it.

  4. #4
    Join Date
    Aug 2001
    Location
    New Jersey
    Posts
    1

    Analyze

    Hi,

    Analyze table TABLE_NAME compute statistics...

    This command analyze all tables, all associated Indexes, all partitions of tables as well as all partitioned indexes. So you don't need to run seperate analyze index.

    Thanks

    -Puneet

  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Originally posted by UNIX DBA
    I thought that analyzing the tables also analyzed the indexes. For all indexes only analyzes the index.
    You are correct. ANALYZE on table automatically collects the statistics for each of the table's indexes and domain indexes, provided that no for_clauses are used.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


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