1.分析所有表

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

select 'analyze table '||table_name||' compute statistics;' from user_tables;

Oracle查询出所有空表 Oracle 第1张

copy出来执行。。。。更新user_tables的num_rows

Oracle查询出所有空表 Oracle 第2张

 

 2.

   select * FROM user_tables WHERE NUM_ROWS =0 ;

Oracle查询出所有空表 Oracle 第3张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄