on 10-03-2007 5:38 AM
Hi Experts
I'm using update statistics command to analyze a table and would like to know later when this table was analyzed.
I saw that in the user_tables table the num_rows coulmn was changed but the last_analyzed coulmn was not changed.
Does anyone know if last_analyzed coulmn should be changed and if so why it didn't ? or maybe there is another way to get this information for sap db ?
thanks alot,
Piroz
You can use the SQL Server command
"STATS_DATE ( table_id , index_id )"
to find out when the stats were updated for a particular index and table. You can find more help and detailed example on bookonline (BOL).
RT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You will definitely get syntax error if you run the statement as it in my post.You need to substitute table_id and index_id parameters. More information is available in Books online. Here is the example from Books online which gives the stats date for all the indexes.
SELECT name AS index_name,
STATS_DATE(object_id, index_id) AS statistics_update_date
FROM sys.indexes
Thanks,
RT
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.