您好,欢迎来到宝玛科技网。
搜索
您的当前位置:首页Oracleanalyzetable的使用总结

Oracleanalyzetable的使用总结

来源:宝玛科技网


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视频教程

Copyright © 2019- baomayou.com 版权所有 赣ICP备2024042794号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务