当前位置:   article > 正文

oracle 中查询记录数大于1000、进行过全表扫描、没有索引的表(性能优化)_oracle 检索出所有行数超过1000的表

oracle 检索出所有行数超过1000的表

执行前修改p.OBJECT_OWNER,注意都是大写字母

select table_name, num_rows
  from user_tables
 where table_name not in (select distinct table_name from user_indexes)
   and table_name not like '%_BAK'
   and table_name not like '%_BK'
   and num_rows > 1000
   and table_name in (SELECT distinct p.OBJECT_NAME
                        FROM v$sql_plan p
                       WHERE p.operation = 'TABLE ACCESS'
                         and p.OBJECT_OWNER = 'HR_GD'
                         AND p.options = 'FULL')
 order by num_rows desc 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/425303
推荐阅读
相关标签
  

闽ICP备14008679号