I have a table which has more than 380 million records. I have a stored procedure which:
- Deletes some records.
- Insert something.
The total procedure takes around 30 minutes to execute. Out of this DELETE takes 28 minutes.
Delete is a simple statement, something along these lines:
Delete a where condition_1 AND condition_2 AND condition_3
Can anybody help me?
Firstly have a look at your indexing and query..it should really in the first place not take
28 mins?It maybe worth taking a look at database tuning and query optimization…maybe you can also try to delete records incrementally..something suggested here..