Some times it’s the simple function that helps.
This simple query will give return tables that haven’t be updated in over a year. They are most likely. Each should be reviewed to be dropped or converted into a compressed archive table.
USE information_schema;
SELECT TABLE_SCHEMA,
    TABLE_NAME,
    TABLE_ROWS,
    CREATE_TIME,
    UPDATE_TIME
FROM `TABLES`
    WHERE (TABLE_SCHEMA != "information_schema")
        AND (TABLE_SCHEMA != "mysql")
        AND (UPDATE_TIME < ADDDATE(NOW(), -365))
ORDER BY Table_Schema, update_time;
Tweet
 

 
  LinkedIn
 LinkedIn Grennan.com
 Grennan.com Twitter
 
Twitter
