Professional Documents
Culture Documents
com/mattiasgeniar/zabbix-orphaned-data-cleanup/blob/master/checks
cript.sql
https://github.com/mattiasgeniar/zabbix-orphaned-data-cleanup/blob/master/cleanu
p.sql
select count(*) from housekeeper;
select count(*), tablename from housekeeper group by tablename;
SELECT TABLE_SCHEMA, TABLE_NAME,(INDEX_LENGTH+DATA_LENGTH)/(1024*1024) AS SIZE_M
B, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA NOT IN ("mysql",
"information_schema") ORDER BY SIZE_MB DESC LIMIT 10;
BORRAR TABLAS
**********
SELECT COUNT(*) FROM graphs_items WHERE NOT itemid IN (SELECT itemid FROM items)
;