- 统计用户下多少表,以及每个表的数据 需要在information_schema下去查询

-- 统计test用户下总共多少表
SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = 'test' GROUP BY table_schema;
-- 统计test用户下,每个表的记录条数
select table_name,table_rows from tables where TABLE_SCHEMA = 'test' order by table_rows desc;
where table_schema = 你的数据库名
3370

被折叠的 条评论
为什么被折叠?



