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

Thread: gather_database_stats deletes stats?

  1. #1
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    Hi,

    I am running gather_database_stats every weekend. Strangely there is one table with its indexes every monday, that aren't analyzed (last_analyzed is null) .
    When i manually run gather_schema_stats with options => 'GATHER EMPTY') they all get analyzed.

    I have this problem for a few weeks now...

    Any idea?

    thanks,
    Tomaz

  2. #2
    Join Date
    Jun 2002
    Posts
    22
    Try to analyze schema objects with the package DBMS_STATS and
    the procedure GATHER_SCHEMA_STAT.

    From Manual you can see that :

    Table 8-1 Statistics Gathering Procedures in the DBMS_STATS Package
    Procedure Description
    --------------------- -------------------------------------------------
    GATHER_SCHEMA_STATS Collects statistics for all objects in a schema.

    But after executing this, the indexes are not analyzed.
    Information in column Last_analyzed from dba_indexes is not updated.

    Solution Description
    --------------------
    If you are passing only the parameter ownname or NULL for current schema,
    ensure that the DBMS_STATS.GATHER_SCHEMA_STAT is executed passing also the
    parameter CASCADE=TRUE.

    Aleš

  3. #3
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    Is there any known restrictions why some tables wouldn't be analyzed using dbms_stat.gather_database_stats.
    It should do them all, right?

    Thanks,
    Tomaz

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