# Dml Operations Cause Oom Resolution

+ Scenario A:
  + Force indexing by hint or using index
  + Problem: In scenario a lot of data is read, force-indexing is likely to lead to worse results.

+ Scenario B:
  + Index scan

![left](./student-guide/diagram/20-OOM-resolution-01-01.png)

------------------------------------------------------------
We can try to force indexing by hint or using index. In scenario a large amount of data is read, forcing an index is likely to produce worse results. So at this point we can think differently, is there any method both index and avoid a lot of TiKV coprocessor scanning operations.

If business allows it, we can split one large delete operation into several smaller deletes by primary key or index column. If the logic of the delete statement does not change, we can consider splitting a delete into multiple by using the limit limit and executing it in a loop. Each small delete operation can scan the data by index and avoid filling up TiDB's memory with a large amount of data.
