??????????Oracle?????????
?????universewindy ???????[ 2017/3/14 16:13:11 ] ????????????? Oracle
????Oracle???????????
????· ????????????????????????????????????????????
????· ??????????????????????????????????sql??????Щ?????where????г??????ν?????????
????· where????в??ò??????в??????????????upper???????y????????????????
????· ??SQL????о???????GROUP BY??ORDER BY??????????????
????· ??????????У?????/???????????????
????· ????????????????????????????????????????????????????????????????????
????· ??????????????????????????????????????????????????????????????????????????
????· ????С?????????????????????????
????· ????????????????????????????????????Σ?
????· ?????????н????????ν?????????
????· ??????????????????????????????
????· ???????????????????????????????????o?????????????磺????????????????????????У????д?Χ??????
????· ???????????????????????I/0?????????Ч??????????????????????????????????????????????????????
????· ???????д???????DML???????????Bitmap??????
????· ?????????£??????????????????????????????????????????????????????4?????????????????????????????
????· ????????????????????????м????????5%????????????
????· ?洢??????????????趨
????· ?????????仯????????Ч???????????????????????
????Oracleλ????? B-??????
????B-????????Oracle????????????????????????????????????????????????????32?С?
???????????create index indexName on tableName(columnName);
???????
????1.???????洢null???????????????????????洢null??????????????洢??Null?????????????洢Null??????????в???is null????????????????????Null??????????????????????????衣
????2.?????????????С?????????й??
????3.?????????????????????(like '%XX'????like '%XX%')???????????????衣
????λ?????Oracle?????????????λ???????????????????ROWID?????λ???????????30?С?
???????????create bitmap index indexName on tableName(columnName);
???????
????1.?????B*Tree??????????????С??????????÷????λ???????????洢????????Rowid??λ??????????????
????2.????????????С?
????3.?????update??insert??delete??????С?
????4.????洢null???B*Tree???????????????????????is null?????????????????裬????λ??????н???is null????????????????????
????5.??select count(XX) ??????????????????????λ?????ó?????????
????6.??????????and??or?? in(x??y??..)?????????????????λ????л?????????ó???????????
????λ??????к???????
???????????????????????λ?????
?????????ATLER TABLE?????????????λ???????????????λ??????Ч
????λ??????????????д??????????????????????????????????κ??????????????
????λ???????????????????
???????????????е????
????1?????ν???????????????????磬??????2?????????
?????????SELECT * FROM T WHERE Y=XXX;
????????T?????????????Y?????????????????????????????????е????????Ч?????????????????????TABLE ACCESS FULL??
????????????SELECT Y FROM T WHERE Y = XXX??????????????????????Y??????????B???п?????????????
????2???????B?????????????????????????????????????????
???????????????????SELECT COUNT(*) FROM T
????????????????????????Ч???????SELECT COUNT(*) FROM T WHERE XXX IS NOT NULL?????????????
????3???????????????ú????????2???????????
?????????SELECT * FROM T WHERE FUN(Y) = XXX??
?????????T?????????????Y???????????????????????????????????е??ж????????????飬
??????????????????????????????????????????CREATE INDEX IDXFUNT ON T(FUN(Y));????????????Oracle????????洢???к??????????????????в?????????????м??????
????4???????????????????????????
?????????SELECT * FROM T WHERE Y = 5
??????Y???????????????????Y????VARCHAR2??????Oracle???????5?????????????????SELECT * FROM T WHERE TO_NUMBER(Y) = 5????????????п????ò??????????
????5?????????м?????????С??????????Oracle????????????????????????????????????????????????rowid????????л??????????????????????С??????£???????????????????е????顣
??????
???·???
??????????????????
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