Oracle?????????????Ч????????
???????????? ???????[ 2013/4/3 10:10:39 ] ????????
????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??????????????????????衣
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11