Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Missing Indexes


Missing Indexes

Author
Message
mandir.jain
mandir.jain
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 24
Have given a list of missing indexes. How to decide which indexes are to be created. Please help urgenly:-)
BrainDonor
BrainDonor
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2057 Visits: 11222
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.

Steve Hall
Linkedin
Blog Site
mandir.jain
mandir.jain
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 24
one scenario may benefit from creating ,other scenarios may not. So how to decide ? how many scenarios to test? :-)
BrainDonor
BrainDonor
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2057 Visits: 11222
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.

Steve Hall
Linkedin
Blog Site
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45464 Visits: 39948
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.
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. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search