Well, the first question is simple:
When should a clustered index be used?
Always. Period. Except in very rare, rare cases. A clustered index makes the table faster for each operation. YES! It does. See Kim Tripp excellent. Cluster index discussion continues for more information. She also mentions her basic criteria for a cluster index:
- narrow
- static (never changes)
- unique
- if possible: ever increasing
INT IDENTITY does this perfectly - the GUID does not. See the GUID as the primary key for detailed reference information.
Why narrow? . Since the cluster key is added to each index page of each non-clustered index in the same table (to be able to really look for a data row if necessary). You do not want to have VARCHAR (200) in the clustering key ....
Why unique? See above - the clustering key is an element and mechanism that SQL Server uses to uniquely find a row of data. It must be unique. If you choose a custom clustering key, SQL Server itself will add a 4-byte identifier to your keys. Be careful!
Next: non-clustered indexes. Basically, there is one rule: any foreign key in a child table that refers to another table must be indexed, this will speed up JOIN and other operations.
In addition, any queries containing WHERE clauses are a good candidate - choose those that run a lot. Place indexes on the columns that appear in WHERE clauses in ORDER BY statements.
Next: measure your system, check DMV (Dynamic Management Views) for tips on unused or missing indexes, and set up your system again and again. This is an ongoing process, you will never become! See here for information on these two DMVs (missing and unused indexes).
Another warning: with a load of indexes, you can make any SELECT query really very fast. But at the same time, INSERT, UPDATE, and DELETE may suffer, which should update all indexes involved. If you only CHOOSE - go! Otherwise, it is a wonderful and delicate balance. You can always tune one query beyond belief, but the rest of your system may suffer in doing so. Do not reindex your database! Put some good indexes in place, check and observe how the system works, and then maybe add one or two more, and again: see how this affects the overall performance of the system.