Hi,
I have table named "Map" with structure "XPos int, YPos int, FieldType int".
The "XPos" and "YPos" are primary key. There are several tables depending on this table, referencing "XPos" and "YPos" columns.
In "Map" table users can not add or remove rows. Rarely is changed value in "FieldType" column.
The most selects looks like:
SELECT M.XPos, M.YPos, M.FieldType, N.NoteTitle, N.NoteDescription
FROM Map AS M
INNER JOIN Note AS N ON M.XPos = N.XPos AND M.YPos = N.YPos
WHERE M.XPos >= 248 AND M.XPos <= 311
AND M.YPos >= 578 AND M.YPos <= 715
How should I index it for good select performance?. Now I have one clustered index on "XPos, YPos", but I don't think this is best way.