I have some doubts about choosing the right index and some questions arise:
Clustered index
What is the best candidate?
This is usually a primary key, but if the primary key is not used in the search, for example, it is CustomerNoused to search clients, if the clustered index is placed on CustomerNo?
Views with SchemaBinding
If I have a view with indexes, I read that they are not used, but the ones on the tables.
Does it make no sense? Or am I missing a point? Would it make a difference using "NOExpand" to force an index to be read from a view, not a table?
Nonclustered Indexes
When adding a non-clustered index, is it good to include all possible columns until you reach the limit?
Thanks so much for your time. I am reading a massive database and speed is a must
source
share