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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Indexes?

Author  Topic 

luissimoes
Starting Member

10 Posts

Posted - 2007-06-28 : 11:36:52
When do we should not use the indexes?



In Inserts? In Updates? in Deletes?



If i have a massive delete like:

delete from table1 where column1='X' (2 million rows) should i have the index enabled or not?



Whats the best option? To disable indexes on massive inserts and then rebuild or to delete and recreate?





Best Regards

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2007-06-28 : 21:45:20
Depends. What about other transactions - will you have queries going on while the delete occurs? Try it out for your scenario & see. You've identified two approaches. Only you know enough about your problem to answer this question.
Go to Top of Page

hey001us
Posting Yak Master

185 Posts

Posted - 2007-06-28 : 22:00:58
I believe the below URL will help you more:
http://www.sql-server-performance.com/optimizing_indexes.asp


hey
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-28 : 22:27:39
Not necessary to drop index for massive inserting in sql2k5, and proper index may speed up updating and deleting.
Go to Top of Page
   

- Advertisement -