ORACLE根据账号查询每张表数据量:

select t.table_name,t.num_rows from user_tables t ORDER BY NUM_ROWS DESC;

SQL SERVER查询总数据量:

SELECT   SUM(记录条数) AS 总记录数
FROM      (SELECT   TOP (10000) a.name AS 表名, MAX(b.rows) AS 记录条数
                 FROM      sys.sysobjects AS a INNER JOIN
                                 sys.sysindexes AS b ON a.id = b.id
                 WHERE   (a.xtype = 'u')
                 GROUP BY a.name
                 ORDER BY 记录条数 DESC) AS t1;

 SQL SERVER分表查询数据量:

SELECT   a.name AS 表名, MAX(b.rows) AS 记录条数
FROM      sys.sysobjects AS a INNER JOIN
                sys.sysindexes AS b ON a.id = b.id
WHERE   (a.xtype = 'u')
GROUP BY a.name
ORDER BY 记录条数 DESC

 

 

 

MYSQL查询语句:

use information_schema;
select table_name,table_rows from tables where TABLE_SCHEMA = 'test' order by table_rows desc;

 

相关文章:

  • 2021-11-20
  • 2021-07-23
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2021-04-24
  • 2021-06-04
  • 2022-12-23
猜你喜欢
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案