??????????????
??????????????????????????method_opt????????????????????oracle??????FOR ALL COLUMNS SIZE AUTO??oracle???????????????????????????????????????????????????????????????????????????????????
????oracle????????????????????????????????????????????????????????????????????????б???????????????????е?????????????????????????·???????????????????????裬??????where??????ν????????????????????????????????????????????????????á?
????????????????????????
???????where?????????е???????????б(??????????????????????????)????????????????????????????б?????????????????????????
?????????????????????ò???method_opt:
?????????for all column size skewonly????????????е??????????????????????????????????????
????????for all column size auto????????????е?????????????е?????????????????????????????????
???????????Ч
????oracle??????????????????????????????????????????????statistics_level?????typical????all?????????????????????????user_table_modifications??insert??update??delete???????????????????????10%?????????????????Ч??????????????????
???????????????????????????????????????oem????dbms_stats.set_*_prefs???ò??????????? ????????
????????????????I/O??cpu?????????????????????????sql????????I/O??cpu?????????????????????????????IO??cpu????????????????????????м????oracle???????????????????
????oracle?????????????????????????и?????????????????(???????)?????dbms_stats.gather_system_stats??????????????????ù????????dba??????gather_system_statistics?????????С?
???????и?????????????????????????????????????????????????????????????????
?????и????????
??????????????????????????????????(sreadtim??mreadtim)???????????????????(mbrc)??cpu???(cpuspeed)??I/O?????????????????????(maxthr)?????????????????(slavethr)??
?????????????????????и?????????:
????????1
????????????????????                                                      exec dbms_stats.gather_system_stats('start');
???????????????????????
????exec dbms_stats.gather_system_stats('stop');
????????2
????exec dbms_stats.gather_system_stats('interval'??interval=>N);
????????????????????N???????????????
??????????????
?????????????????io???????(iotfrspeed)??io??????(ioseektim)??cpu???(cpuspeednw)??
???????dbms_stats.gather_system_stats()??????????????????
?????????????
??????????????????????????????????????????oracle?????????????????oracle?????sql???????????sql??????С?????????????????????????????
??????????????????optimizer_dynamic_sampling??????sql??????????????????????????????oracle11g??????????0??11??????????????????????????????????????????????????????????????С??
????0????????????? 2???????????????????????????????????????????? 11??????????????б?????????????????????????11.2.0.4????????????????????????????????????sql??????????????????