5 thoughts on “Gathering Fixed Objects Statistics”

  1. Hi there,
    I just read your post regarding the fixed objects statistics gathering.
    I'd like to ask for your opinion for this:
    I have a production database running on a 2-node RAC. Both instances are running really slow when joining for example, V$SQL and V$SESSION by SQL_ID.
    Do you think gathering the statistics on peak hours will improve the performance?
    Also, if I get bad results, will it be a good idea running dbms_stats.delete_fixed_object_stats? Statistics for fixed objects have never been gathered and the database has been running for 2+ years.

    Thanks in advance 🙂

  2. Gathering fixed objects stats may help, I suggest you to do this practice on a test DB first before going production, try first to export the fixed stats on a table, test the performance on the fixed objects, at the end try to import old stats back.
    Could you please tell me how many object you have in DBA_RECYCLEBIN?
    select count(*) from dba_recyclebin;
    Having too many objects in the dba_recyclebin may cause the same scenario you have, specially if your applications are heavily depend on temporary tables. if so I suggest you to purge it unless you need the recycled objects.

  3. Hello again,
    I know a lot of time has passed but I purged the recycle_bin and the queries on fixed objects have run a lot faster.
    I also tried to gather new statistics on peak hours, as you say on your post. However, I didn't notice any difference, so I imported the old stats back.
    Thanks! 🙂

  4. I came across your article to gather fixed objects stats in order to tune the queries against DBA_EXTENTS without any luck, querying DBA_EXTENTS to check the size of any object no matter it's big or small still takes very long time, gathaering fixed object stats didn't make any improvement! Any idea?

  5. Thanks for your comment;
    DBA_EXTENTS is querying X$KTFBUE which is not covered by gather_fixed_objects_stats procedure; you have to gather the statistics separately on this table using the following:

    SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS ('SYS','X$KTFBUE');

    It's recommended to flush the shared pool to get the new statistics take effect immediately:
    SQL> ALTER SYSTEM FLUSH SHARED_POOL;

    I've updated the article with the same.

Leave a Reply

Your email address will not be published. Required fields are marked *