|
to dblife
我做了你的实验的确发生了这个情况.
找了一下资料发现了下面的一段话
Note: If you want to collect statistics on both the table as a whole and on one or more
columns, be sure to generate the statistics for the table first, and then for the columns.
Otherwise, the table-only ANALYZE will overwrite the histograms generated by the
column ANALYZE. For example, issue the following statements:
ANALYZE TABLE emp ESTIMATE STATISTICS;
ANALYZE TABLE emp ESTIMATE STATISTICS FOR ALL COLUMNS;
我想你应该先做
ANALYZE TABLE emp ESTIMATE STATISTICS;
ANALYZE TABLE emp ESTIMATE STATISTICS FOR ALL indexes; |
|