one scenario may benefit from creating ,other scenarios may not. So how to decide ? how many scenarios to test? :-)
Indeed. And somebody has to make the decision which change to make, depending upon the impact it has under different scenarios. They have to understand, by testing, what the benefits are and ensure that they outweigh the negative impact.
Part of a DBA role, oddly enough.
If the table is large and the indexes are wide, it can have a MAJOR impact on things that people forget about. First, the creation of ALL Non-Clustered indexes isn't much more than a duplication of data sorted in a particular order. If people "go nuts" with wide "covering indexes" that work for just one report, then you can very easily double, triple, or even quadruple (sometimes, even worse) the size of the database. That means....
1. More disk space required that you may not have.
2. Index maintenance will become significantly longer,
3. Backups will take significantly longer.
4. Backups to disk will take significantly more disk space that you may not have.
5. Storage on table will become significantly larger.
6. Restores will take significantly longer.
7. INSERTs and DELETEs will take significantly longer. UPDATEs could take significantly long depending on what is being updated and what the index columns are based on. Duration and resource usage during large batch processes may require some serious attention depending on how many indexes are impacted by the batch runs.
8. REORGANIZEing big indexes will always have an impact on the size of the log file. REBUILDing indexes will have a large impact on the log file if the database is in the FULL recovery model.
9. Mirroring could take significantly longer and use significantly more resources.
The addition of indexes (even some of the more narrow indexes) should not be a willy-nilly exercise based only on the performance of SELECTs. Frequently, writing better code is more effective than trying to throw an index at a problem. As "BrainDonor" previously stated, the only way to know for sure is to test but now you know of a couple of other things that you should test for other than whether or not a query or two meet duration SLAs.
You should also do a search for "Kimberly Trip Index MCM Training". It can be a huge help.
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs