I like to think I know enought theory, but I have little experience optimizing DB in real world. I would like to know points of view, thoughts or experiences.
Let's imagine a scenario like:
Table A Key: c1, c2, c3, c4 Index: c7, c3, c2
Table B Key: c1, c2, c3, c4 Index: c1, c5
All are non-clustered. The tables have 40+ fields. They are feeded daily by night and have some updates during the day.
Table A, if more queries benefit from Key than Index, could the index impact negatively? Because insert/delete has to update 2 indexes instead of 1.
Table B, has an extra field at the index, not present in key.
Could a query using c1, c5
Benefit from this Key?: Key: c1, c2, c3, c4, c5
So that Index could be droped.
What impact does the order of the fields has? Key: c1, c2, c3 Key: c3, c1, c2
A typical scenario for me is process_date, client_number, operation. And it feeds with a bunch of data each day (process_date).