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

Thread: Issues about statistics

  1. #1
    Join Date
    Aug 2005
    Posts
    4

    Issues about statistics

    I updated statistics for tables in my database with the statement
    analyze table 'TABLE_NAME' compute statistics for all columns.
    With some disappointment I noted that some fields, like EMPTY_BLOCKS, AVG_SPACE where not updated. I deleted the statistics with the statement analyze table 'TABLE_NAME' delete statistics and, afterwards, I am no more able to recreate the statistics. Has anyone any hints?
    Moreover how can I update the statistics for EMPTY_BLOCKS and AVG_SPACE?
    Thanks.
    Marta

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    why cant you create statistics anymore - and you dont mention what version you are on

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Have you used DBMS_Stats.Gather_Table_Stats? It's what you should be using anyway.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  4. #4
    Join Date
    Aug 2005
    Posts
    4
    I am using Oracle 9.0.2 and when I say I can no more create statistics I mean that fields in public.user_tables are kept null.
    After using DBMS_Stats.Gather_table_stats, statistics are updated, expecially fields like num_rows and blocks, but fields like empty_blocks and avg_space are set = 0. Somewhere I read that it should be used analyze in order to update these fields, but I tried with no success.
    Thanks.

  5. #5
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    why do you care though? dbms_stats.gather_table_stats is what you should use. Let it do its work

  6. #6
    Join Date
    Aug 2005
    Posts
    4
    I am looking for a tool to use in order to monitor the space used by tables and I thought that dbms_stats.gather_table_stats was the right one, but seeing empty_blocks always set = 0 doesn't let me do any evaluation

  7. #7
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    dba_segments is what you want then, that is the only real indication of how much space a table is taking

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