SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Building indexes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

WJHamel
Aged Yak Warrior

USA
614 Posts

Posted - 07/18/2012 :  19:41:01  Show Profile  Reply with Quote
So i have this HUGE data conversion that i'm working on. My scripts are replete with Inner Joins. Overall, many of the joins are taking hours to run. Most of the columns it's reading from have in excess of 200,000 rows, some as many as 700,000. I've indexed as many of those columns as i've had time to at this point, but it's pretty clear that i need to index many more of these columns from these tables.

Is there ANY quicker way to create indexes for ALL columns in a given table without writing code for EACH line? Maybe a 3rd party app that will look at those columns and create an index with a default name?

visakh16
Very Important crosS Applying yaK Herder

India
47069 Posts

Posted - 07/18/2012 :  20:17:41  Show Profile  Reply with Quote
why should you create index on ALL columns in a table? You need to analyse and add once those indexes which your queries should be able to utilise. Use database tuning advisor to get an idea on queries to be tuned. Adding too many indexes will also cause issues as your DML statement will become slower

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000