Proper use of multiple indexes in SQL (SQL Server 2014)

New for creating indexes in SQL Server. Suppose I have 3 columns A, B, C, none of which are my primary key. I create many requests with offers WHEREthat contain any and all of their combinations. So, some sentences WHEREmay include only A, others A and B, others B and C, some of the three, etc.

+4
source share
2 answers

(A, B, C), n , :

  • WHERE
  • A B
  • A

(A, B, C) :

  • B C
  • B
  • C

, , .

: , INSERT, UPDATE DELETE ( ).

- over-index! , ...

+4

2) , . , , ( ). , , F, A, B , ((A, B) include (F)), , (A, B) . F .

1) , , .. , , - , , , 1000 . , , SQL Server (PRIMARY KEY) .

SELECT , marc_s.

+2

Source: https://habr.com/ru/post/1629387/


All Articles