Commit truncation with rowcount I am new to SQL, I have a million rows in a table to delete. I wrote code to commit the transaction (delete the rows) every time the count reaches 50k and reset the counter again. My question is why I put a commit statement for the counter 50,000 not 10,000 or 1,000?

Is it OK to commit for every 1,000 deletes? What will happen and is it likely to affect performance?
It sounds like you are trying to delete everything in your table, is that correct? If so, I would check into a TRUNCATE syntax, this will cause the least amount of performance impact as it will not log the row by row delete. Additionally, since this is relatively low impact you shouldn't need to divide this up for only 1 million rows.


  In Oracle, truncating a table is a fast way to clear out records from
  a table if you don't need to worry about rolling back. One of the
  reasons is that when the table is truncated, it does not affect any of
  the table's indexes, triggers, or dependencies. Truncating a table is
  also a lot easier than dropping the table and recreating it.


Oracle / PLSQL: TRUNCATE TABLE Statement