jwcolby
jwcolby at colbyconsulting.com
Thu Dec 3 10:16:54 CST 2009
I have a table with a unique PKID (int) and a bunch more fields. I created a clustered index so that (my understanding) the data is sorted by the PK and all the fields are physically stored "together" (whatever that might mean). Now... in actual use I will join that table to other tables using that PK and then select a single field from the table to include in the view. Obviously the PKID is not useful to me other than that it is indexed and used in the join. My question is, do I need to build a "cover index" that includes the PKID and that single field that I always use? Or is the fact that the data is already "stored together" give me access to that other field, and the cover index is not useful? I suspect that I should have the cover index but this is one of many gray areas in my knowledge. TIA for your assistance. -- John W. Colby www.ColbyConsulting.com