Comments - User Statistics

11 years ago Federico Razzoli
This comment has the status of 'removed' and can only be seen by you.

Please note that it is trivial to create stored procedures which do that:

DELIMITER ||

CREATE PROCEDURE `show_all_stats`() READS SQL DATA COMMENT 'SHOW all user statistics' BEGIN SELECT 'CLIENT_STATISTICS:' AS `Note`; SHOW CLIENT_STATISTICS; SELECT 'USER_STATISTICS:' AS `Note`; SHOW USER_STATISTICS; SELECT 'INDEX_STATISTICS:' AS `Note`; SHOW INDEX_STATISTICS; SELECT 'TABLE_STATISTICS:' AS `Note`; SHOW TABLE_STATISTICS; END;

CREATE PROCEDURE `flush_all_stats`() MODIFIES SQL DATA COMMENT 'FLUSH all user statistics' BEGIN FLUSH CLIENT_STATISTICS; FLUSH USER_STATISTICS; FLUSH INDEX_STATISTICS; FLUSH TABLE_STATISTICS; END;

DELIMITER ; COMMIT;

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.