views:

38

answers:

2

I have a large table with a multi-part index. I need to run several queries to update a field that is part of the index. Basically every row will be updated. Would it be faster to drop the index, do all the updates and then re-add it?

EDIT: Added question, why does it take so freaking long to DROP an index? Am I missing something or shouldn't this take about .5 seconds?

+1  A: 

There are a number of factors involved. My guess is that yes it would be faster to drop the index and rebuild it after the updates. Your best bet, though, is to test it and see which is faster.

Mark Wilkins
+1  A: 

Why does it take so freaking long to DROP an index?

You may want to check the following:

Daniel Vassallo
That's just glorious. Thanks for the information
Kevin