查询对象统计信息相关SQL
第一,表统计信息 --1.1批量查看表统计信息 select owner,table_name,object_type,num_rows,last_analyzed from dba_tables where (owner = 'FWY' and table_name = 'T1') or (owner = 'FWY' and table_name = 'T2') or (owner = 'FWY' and table_name = 'T3') or (owner = 'FWY' and table_name = 'T4'); --1.2批量查看更详细的表统计信息(10g以上) select * from dba_tab_statistics where (owner = 'FWY' and table_name = 'T1') or (owner = 'FWY' and table_name = 'T2') or (owner = 'FWY' and table_name = 'T3') or (owner = 'FWY' and table_name = 'T4'); --BLOCKS 该对象的段的高水位线以下的数据块。 --EMPTY_BLOCKS 高水位线以上的。 --SAMPLE_SIZE 收集的统计信息行数
第二,索引统计信息 --2.1 批量查看索引统计信息
select owner,index_name,table_owner,table_name,uniqueness,compression,blevel,leaf_blocks,distinct_keys,status,num_rows,last_analyzed from dba_indexes where where (owner = 'FWY' and table_name = 'T1') or (owner = 'FWY' and table_name = 'T2') or (owner = 'FWY' and table_name = 'T3') or (owner = 'FWY' and table_name = 'T4');
--2.2 批量查看索引统计信息(10g以上) select * where (owner = 'FWY' and table_name = 'T1') or (owner = 'FWY' and table_name = 'T2') or (owner = 'FWY' and table_name = 'T3') or (owner = 'FWY' and table_name = 'T4');
第二,列统计信息(包含直方图) --查看列统计信息 select t2.owner, t2.table_name, t2.column_name, t2.LAST_ANALYZED, t1.num_distinct, t1.low_value, t1.high_value, t1.DENSITY as "密度", t1.num_nulls, t1.avg_col_len, --t1.histogram,--9i的没有这个 t1.num_buckets from dba_tab_col_statistics t1 right join dba_tab_columns t2 on t1.owner=t2.owner and t1.table_name=t2.table_name and t1.column_name=t2.column_name where (owner = 'FWY' and table_name = 'T1') or (owner = 'FWY' and table_name = 'T2') or (owner = 'FWY' and table_name = 'T3') or (owner = 'FWY' and table_name = 'T4');
- 10-26Whitewidow SQL漏洞扫描工具演示
- 10-26SQL黑客注入防御与绕过的多种姿势
- 12-23SQLServer数据库操作总结(sql语法的使用)
- 12-21C#连接Sqlite
- 12-21ORACLE数据库学习之SQL性能优化详解
- 12-21解决SQLSERVER2008数据库日志文件占用硬盘空间问题
- 01-11全球最受赞誉公司揭晓:苹果连续九年第一
- 12-09罗伯特·莫里斯:让黑客真正变黑
- 12-09谁闯入了中国网络?揭秘美国绝密黑客小组TA
- 12-09警示:iOS6 惊现“闪退”BUG
- 12-05亚马逊推出新一代基础模型 任意模态生成大模
- 12-05OpenAI拓展欧洲业务 将在苏黎世设立办公室
- 12-05微软质疑美国联邦贸易委员会泄露信息 督促其
- 12-05联交所取消宝宝树上市地位 宝宝树:不会对公
- 12-04企业微信致歉:文档打开异常已完成修复