????Oracle?в??????????????????????Ч?????????????????????????????

????1????????????????????????????????
SQL> create table StudentInformation(id number(20) not null primary key??name varchar2(10) not null??
sex varchar2(2)??address varchar2(20)??hobby varchar(20));
declare
         maxrecords constant int:=180000;
         i int :=1009;
     begin
         for i in 120000..maxrecords loop
           insert into STUDENTINFORMATION("ID"??"NAME"??SEX??ADDRESS??HOBBY)
            values(i??TO_CHAR('99'+i)??'??'??'???????'??'??????');
         end loop;
     dbms_output.put_line(' ??????????? ');
     commit;
     end;

?????????????????????address????hobby?????????????????????95000???????

????2??????????

??????????????

SQL> CREATE INDEX index_address_hobby ON STUDENTINFORMATION(address??hobby);

?????????????????
SQL>analyze table STUDENTINFORMATION compute statistics for table for all indexes for all columns; 
SQL> set autotrace traceonly;
SQL>set timing on;
SQL> select * from StudentInformation where hobby='??????';

????Oracle??????????????????????????裬?????????????????????????????????????????hint????????????????
SQL> SELECT/**//*+ INDEX (StudentInformation index_address_hobby )*/ * FROM StudentInformation WHERE hobby='??????';

????statistics???????????????consistent gets?????????????????μ??????????????????????μ??????????200???????????????Oracle??????????????????????衣