>  기사  >  데이터 베이스  >  Oracle analyze table的使用总结

Oracle analyze table的使用总结

PHPz
PHPz원래의
2016-06-07 15:52:361927검색

analyze table 一般可以指定分析: 表,所有字段,所有索引字段,所有索引。 若不指定则全部都分析。

SQL> analyze table my_table compute statistics;  

SQL> analyze table my_table compute statistics for table for all indexes for all columns;   

SQL> analyze table my_table compute statistics for table for all indexes for all indexed columns;  

SQL> analyze table my_table compute statistics;  

等价于:

SQL> analyze table my_table compute statistics for table for all indexes for all columns;   

sample:

analyze table t1 compute statistics for table;
analyze table t2 compute statistics for all columns;
analyze table t3 compute statistics for all indexed columns;

analyze table t5 compute statistics for all indexes; 

analyze table t4 compute statistics;     (不指定)

另外,可以删除分析数据:

SQL> analyze table my_table delete statistics;

SQL> analyze table my_table delete statistics for table for all indexes for all indexed columns; 

更多相关教程请访问   MySQL视频教程


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
이전 기사:LVS+Mysql集群负载均衡다음 기사:MySQL Hash索引和B