查看一个库中各表的情况
SELECT CONCAT(table_schema,’.’,table_name) AS ‘Table Name’, CONCAT(ROUND(table_rows/1000000,4),‘M’) AS ‘Number of Rows’, CONCAT(ROUND(data_length/(102410241024),4),‘G’) AS ‘Data Size’, CONCAT(ROUND(index_length/(102410241024),4),‘G’) AS ‘Index Size’, CONCAT(ROUND((data_length+index_length)/(102410241024),4),‘G’) AS’Total’FROM information_schema.TABLES WHERE table_schema LIKE ‘test’;
查看一个库中的情况
truncate table table_name;