Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to understand if the table up-to-date or stale?

unknown-879931Dec 4 2013 — edited Dec 5 2013

Hello Experts

I use the following in order to understand that the table is up-to-date or stale. However, it is said that the table is not stale but when I check row numbers from user_tables it is not match the real number of rows. The difference is 272132. Is this normal? Normally, approx 50000 rows are inserted to the  answers table per day.

My other question is, is there other ways in order to check that table's statistics are up-to-date or not? What is your opinions?

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select stale_stats from user_tab_statistics where table_name = 'ANSWERS';

STA

---

NO

SQL> select num_rows from user_tables where table_name = 'ANSWERS';

  NUM_ROWS

----------

  18525435

SQL> select count(*) from answers;

  COUNT(*)

----------

  18797567

Note: By the way what should I do in order to write codes in code view? I used {code} but it doesn't work.

Thanks in advance.

This post has been answered by Sudhakar_B on Dec 4 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2014
Added on Dec 4 2013
3 comments
2,764 views