SQL > ???? > Create Index

?? (Index) ? ???? ??? ???? ?? ??? ??? ?????. ?? ?? ??? ?????? ?? ?? ??? ???? ?? ??? ??? ??? ??? ??? ???? ???? ???? ??? ??? ??? ?? ??? ??? ??? ???? ?? ?? ??? ?? ???? ??? ???? ? ???? ??? ??? ???. ??? ???? ?? ????? ??? ???? ????.

?????? ???? ???? ???? ?? ?????. ?? ??? ??? ??? ?????? ???? ?? ??? ???? ??? (? ??? 'table scan' ? ??)???.??? ??? ??? ?????? ???? ?? ???? ??? ???? ??? ?? ??? ??? ???? ?? ???? ???? ???? ??? ?? ????.

??? ???? ??? ????? ??? ??? ??? ?? ?????. ??? ??? ?? ?? ???? ??? ???? ????. ??? ??? ??? ??? ????.

CREATE INDEX "???" ON "???" (???);

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

Customer ??
????????
First_Namechar(50)
Last_Namechar(50)
Addresschar(50)
Citychar(50)
Countrychar(25)
Birth_Datedatetime

Last_Name ??? ??? ???? ??? ?? ?????? ?????

CREATE INDEX IDX_CUSTOMER_LAST_NAME
ON Customer (Last_Name);

City ? Country ? ?? ???? ??? ???? ??? ?? ?????? ?????.

CREATE INDEX IDX_CUSTOMER_LOCATION
ON Customer (City, Country);

??? ??? ??? ??? ????. ?? ???? ??? ???? ???? ????? ???? “IDX_” ???????? ?? ??? ?????? ????????. ??? ??? ?? ????? ???? ???? ?? ?????.

???? ????? ?? ??????? ? ??? CREATE INDEX ??? ?? ??? ?????? ??? ????? ????. ?? ???????? ?????? ?????? ??? ??? ???? ????.

SQL ALTER TABLE >>
?


Copyright © 2021   1keydata.com   All Rights Reserved