由于zabbix每天收集大量记录,清理过期的数据以提高查询性能。
mysql -uroot -p 输入mysql密码use zabbix;
-----------------------------------------------------------------------
truncate table history;
optimize table history;
-----------------------------------------------------------------------
truncate table history_str;
optimize table history_str;
-----------------------------------------------------------------------
truncate table history_uint;
optimize table history_uint;
-----------------------------------------------------------------------
truncate table trends;
optimize table trends;
-----------------------------------------------------------------------
truncate table trends_uint;
optimize table trends_uint
-----------------------------------------------------------------------
-----------------------------------------------------------------------
optimize table events;