on 2007 Sep 18 9:57 AM
Hi,
How do I check when was the last update statistics run for a table/index.
Thanks in advance,
Hussain.
Hi Mudasir
I use table T000 as an example. You can do it from sqlplus:
SQL> select table_name, last_analyzed from dba_tables where table_name = 'T000';
TABLE_NAME LAST_ANALYZED
------------------------------ ---------------
T000 08-JUL-07
Index is the same, just query dba_indexes.
Alternatively you can do it from SAP in various ways, i always do this:
ST05 -> Enter SQL Statement: select * from t000 -> Explain -> Click on table t000
There you see: Last statistics date 08.07.2007
This does not execute the SQL, it just generates a plan. Be aware that statistics do not need to be actual. <b>There is no such thing like old statistics</b>. As long as the stats are correct, there is no need to recollect them.
Best regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In DB02 -> Detailed analysis -> table name -> Detailed analysis. We can check the 'Last table analyzed' date. I guess, this is the Last update statistics date for the table.
Regards,
Hussain.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SAP recommends to have statistics run daily in db13, just go there and see if you can find the table in question in the logs for the update statistics job
Alternatively, go to /oracle/SID/sapcheck directory and ls -lrt *.sta files. ( I think that the logs for the stats end in .sta, correct me if I am wrong)
then execute
grep <table_name> *.sta and you will see whichlog files contain that table. It is then easy to find which is the most recent
I hope this helps
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.