Find recently modified tables in MySQL database

The query below lists all tables that was modified in the last 30 days.


Column update_time depends on table storage engine, so some results can be inaccurate. To read more please visit official documentation


select table_schema as database_name,
from information_schema.tables tab
where update_time > (current_timestamp() - interval 30 day)
      and table_type = 'BASE TABLE'
      and table_schema not in ('information_schema', 'sys',
      -- and table_schema = 'your database name' 
order by update_time desc;


  • database_name - database (schema) name
  • table_name - table name
  • update_time - last update time of table (UPDATE, INSERT, or DELETE operation or COMMIT for MVCC)


  • One row: represents one table in a database (schema)
  • Scope of rows: all tables which was last modified in the last 30 days in all databases (schemas)
  • Ordered by: update time descending

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
There are no comments. Click here to write the first comment.