???????Index Building Filter????????????????

???????Щ?????????Ч??????羭?????????????е????????????99%??????????1%??????? ?????????????????????????????????????????????????о??????б?????99%???????????????????????????????????????????????????????????????????????????????á? Index Building Filter????????????????

????SQLServer

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

create index idx_3 on order(status) where status=’running’

??MySQL???????

????Oracle????????????????÷??????

????????Index Include Column???????????У?

?????????????????Щ?????????????????????

????1????????????????????????????

???????綩?????л??ID?????????2????Σ?????????????????????????????
Select * from order where member_id=? and order_date between ? and ?

????????????ID+???????????????????
create index idx_1 on order(member_id??order_date);

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

?????????????????????????????????ID+???б??SQL???£?

select order_id??status from order where member_id=?

?????????????????????member_id??Σ??????????????order_id??status??????????????????????member_id+order_id+status???????????

?????????????????????????????????????????????????????????????????Σ??????????????????????????????

????SQLServer

????SQLServer?????????????????????Index Include Column?????Index Include Column????????????????????????????????????????????Щ?????????У???Щ??????????洢???????У???????????????????????????????????????????????DML????????????磺


create index idx_2 on order(member_id) include(order_id??status);

????????member_id?????????????У?order_id??status????????include?С?

??????????????????洢???????