檢視Mysql 資料庫所有表的資料量

2021-10-06 20:51:38 字數 444 閱讀 3634

想大概了解一下某個資料庫表的資料量的資訊,怎麼辦,不想乙個乙個的select count(1)...

1.##檢視所有表資訊

select * from information_schema.tables where table_schema = '資料庫名稱' \g;

2.##檢視各個表資料量

select table_name,table_rows from information_schema.tables   where table_schema = '資料庫名稱' order by table_rows desc;

mysql 檢視資料庫中所有表的記錄數

mysql使用select count from table name可以查詢某個表的總記錄數。想快速的知道資料庫中所有表的記錄數資訊怎麼辦?如果使用mysql的版本在5.0及以上,可以通過查詢information schema庫中的tables表來獲取,該表中使用table rows記錄表的行數...

mysql 檢視資料庫中所有表的記錄數

mysql 使用select count from table name可以查詢某個表的總記錄數。想快速的知道 資料庫中所有表的記錄數資訊怎麼辦?如果使用 mysql 的版本在5.0及以上,可以通過查詢 information schema 庫中的tables表來獲取,該表中使用table rows...

mysql 檢視資料庫中所有表的記錄數

mysql使用select count from table name可以查詢某個表的總記錄數。想快速的知道資料庫中所有表的記錄數資訊怎麼辦?如果使用mysql的版本在5.0及以上,可以通過查詢information schema庫中的tables表來獲取,該表中使用table rows記錄表的行數...