select concat(round(sum(data_length/1024/1024),2),'MB') as data_size from tables;
select concat(round(sum(data_length/1024/1024),2),'MB') as DB_size from tables where table_schema='ehr';
select concat(round(sum(data_length/1024/1024),2),'MB') as table_size from tables where table_schema='ehr' and table_name='ehr_age';
實際生產環境:比逐條執行SQL查看統計信息更厲害的就是現在的UI界面,但是根本的還是SQL語句!