The index on (ProfileID, Text)(in this order) is also the index on ProfileID.
You can still create an additional index only for ProfileIDif you want to increase performance SELECTon queries that are not related to Text.
However, this has two drawbacks:
( )?
:
CREATE INDEX ix_mytable_profile__text ON mytable (ProfileID) INCLUDE (Text)
, Text .
, UNIQUE, . ProfileID, Text.
(ProfileID, Text). , A, B C, 3. , "A" "A, B C", "B" "C", "B C"?
CREATE INDEX ix_mytable_a_b_c ON mytable (a, b, c)
SELECT a, b,
FROM mytable
WHERE a = 1
SELECT a, b,
FROM mytable
WHERE a = 1
AND b = 1
SELECT a, b,
FROM mytable
WHERE b = 1
SELECT a, b,
FROM mytable
WHERE c = 1
SELECT a, b, , d
FROM mytable
WHERE a = 1
SELECT a, b, , d
FROM mytable
WHERE b = 1