Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mgreen84
Yak Posting Veteran
94 Posts |
Posted - 2014-06-05 : 13:46:59
|
How would I add in my script to remove my column indexes before my insert is ran, but then have them turned back on after the insert is complete? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-06-05 : 13:47:55
|
Script the DROP/CREATE INDEX statements out and add those to your script.I am not sure why you'd want to do this though. How many rows are you inserting?Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2014-06-05 : 15:22:12
|
If you volume of data is so large that this would help, I'd suggest a DISABLE/ENABLE pattern. That way you don't lose any indexes that where dropped and, for whatever reason, not re-created. |
|
|
mgreen84
Yak Posting Veteran
94 Posts |
Posted - 2014-06-05 : 16:04:24
|
Yeah Disabling is what I want to do not drop.quote: Originally posted by Lamprey If you volume of data is so large that this would help, I'd suggest a DISABLE/ENABLE pattern. That way you don't lose any indexes that where dropped and, for whatever reason, not re-created.
|
|
|
|
|
|