我有一個表Person
的列personId, teamId, departmentId
,等等。大多數查詢在where處使用這些列的組合。SQL服務器:對同一列的多個索引性能
例
Select * from .. where personId = 2 and departementId = 1
Select * from .. where personId = 2 and teamId = 1
Select * from .. where departmentId = 2 and teamId = 1
我的問題是,我應該爲每個單獨一個欄的指數?
實際查詢不是選擇*。我只是把這個作爲一個例子 – roncansan