I've been tasked with optimizing a somewhat small Microsoft SQL Server 2008 DB that we all feel is under-performing for its size and whose structure is know to have been abused over the years. Now I'm no dedicated DBA, but I do have enough SQL knowledge to CRUD my way through most problems I've so far encountered so I'm looking for advice here that may fill in some gaps in my knowledge.
1) So my first step will be to take a look at the indexing and the fragmentation thereof. One question is, should I rebuild/reorganize existing indexes or should I drop and recreate them?
My next step would be then be to determine if current keys are indexed and if not, create indexes for them.
2) I've noticed many tables contain columns with foreign key values, but very few contain foreign key constraints on these values. Now I know foreign key constraints aim to maintain the relationships between tables, but should every column containing foreign key values have a foreign key constraint? I feel values used in joins for example, should be constrained so those I will be adding without question wherever I find they're missing. I've read adding foreign key constraints doesn't necessarily improve performance as it results in an extra check during write operations, but indexing these added foreign keys may. What are your thoughts on this?
I'm also researching into adding a maintenance plan that could automatically do index maintenance from time to time and have found some great material to help me accomplish this.
Thanks guys!