Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Missing Indexes Expand / Collapse
Author
Message
Posted Tuesday, February 18, 2014 1:32 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
Have given a list of missing indexes. How to decide which indexes are to be created. Please help urgenly
Post #1542410
Posted Tuesday, February 18, 2014 1:56 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, September 12, 2014 8:30 AM
Points: 1,542, Visits: 8,255
Test them.

Measure the performance with and without the indexes that you believe are required for the tasks that are required. Not all recommendations are correct.


BrainDonor
Linkedin
Blog Site
Post #1542416
Posted Tuesday, February 18, 2014 2:05 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
one scenario may benefit from creating ,other scenarios may not. So how to decide ? how many scenarios to test?
Post #1542421
Posted Tuesday, February 18, 2014 2:15 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, September 12, 2014 8:30 AM
Points: 1,542, Visits: 8,255
mandir.jain (2/18/2014)
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.


BrainDonor
Linkedin
Blog Site
Post #1542424
Posted Tuesday, February 18, 2014 8:37 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 9:16 PM
Points: 37,102, Visits: 31,655
BrainDonor (2/18/2014)
mandir.jain (2/18/2014)
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.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1542613
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse