How to delete small portion of data from BIG table?

You have a big table. The biggest in your system.

You may say big table, big fun but also in some situation a big challenge.

The manager gives you a task:

  • Delete a small portion of data from this table. Only about 1% of rows need to be removed.
  • How would you approach this task?

    What query will you build? How would you minimize logical reads? Would you approach this task differently if it was a one time activity or task executed on a regular basis?

    Consider: is this table used exclusively used by you? Maybe in parallel, some other process execute inserts into this table?

    Continue reading to see how to delete data in batch on SQL Server.

    Read More