Personal tools
You are here: Home DB2 How To's How to check when was executed the last runstats in a specific table
Navigation
Log in


Forgot your password?
 
Document Actions

How to check when was executed the last runstats in a specific table

How to check when was executed the last runstats in a specific table

Check the column STATS_TIME in the table syscat.table to get when was executed the last runstats



TABLE NAME:
TABLE_X
SCHEMA NAME: SCHEMA_X


Checking  when was executed the last runstats for all tables in a specific schema
 db2 "select substr(tabname,1,30), STATS_TIME from syscat.tables where tabschema='SCHEMA_X'"


Checking  when was executed the last runstats in a specific table
 db2 "select substr(tabname,1,30), STATS_TIME from syscat.tables where tabname='TABLE_X'"


Checking  when was executed the last runstats for all tables in the whole database
db2 "select substr(tabname,1,30), STATS_TIME from syscat.tables
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls