INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Tables Stats not updating

Tables Stats not updating

(OP)
I have an Oracle 11g table that I'm attempting to gather stats on.

Thru SQL Developer I exec the following:

EXEC DBMS_STATS.gather_table_stats('OWNER', 'TABLENAME');

However when I go to Statistics tab in SQL Developer; I can see the stats are not updating.

Any thoughts as to why/how this may be occurring would be appreciated.

Thank you.

RE: Tables Stats not updating

Are you doing this via right-click on tablename -> Statistics-> Gather statistics or via SQL worksheet?

Can you provide a screenshot of what you are actually running/typing in to sqldeveloper.

In order to understand recursion, you must first understand recursion.

RE: Tables Stats not updating

(OP)
I've tried multiple ways.

As mentioned above:

From SQL Worksheet - EXEC DBMS_STATS.gather_table_stats('OWNER', 'TABLENAME');
From SQL Worksheet - ANALYZE table HART_MO_ETL.CUST_RMA_DENIAL_MANAGEMENT COMPUTE STATISTICS;

also

via right-click on tablename -> Statistics-> Gather statistics

RE: Tables Stats not updating

What outputs do you get from your commands

a) EXEC DBMS_STATS.gather_table_stats ...
and
b) ANALYZE table ... ;

In order to understand recursion, you must first understand recursion.

RE: Tables Stats not updating

Are you running the stats package from a user that has the rights to insert the stats for that table?

Bill
Lead Application Developer
New York State, USA

RE: Tables Stats not updating

Hi

Please check the below SQL query

SELECT TABLE_NAME,LAST_ANALYZED,NUM_ROWS
FROM ALL_TABLES
WHERE OWNER_NAME=<OWNER_NAME>
AND TABLE_NAME=<TABLE_NAME>

If the LAST_ANALYZED shows today's date and

SELECT COUNT(*) FROM OWNER_NAME.TABLE_NAME IN question matches with NUM_ROWS then your statistics is uptpdate

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close