In my database i'm having the table with 9 million record,I want to delete some record from this based on some condition.I tried to delete records but its taking so much time.,tell me how can i do bulk delete in this..,
How to do the Bulk delete in Sql table?
Collapse
X
-
I don't think there's a faster way. You could try to:Originally posted by gunapriIn my database i'm having the table with 9 million record,I want to delete some record from this based on some condition.I tried to delete records but its taking so much time.,tell me how can i do bulk delete in this..,
1. Rearrange your WHERE clause.
2. Create index for those columns in your condition.
3. Try a:
The catch: TRIGGERS, DEFAULTS, CONSTRAINTS, etc are not inherited by the new table.Code:select * into temp_table from yourtable where IncludeThisRecord = 'YES' drop table yourtable sp_rename temp_table, YourTable
Good luck
-- CK
Comment