Working on a fairly high volume site. There are some tables example - the customers table which gets hit a lot.
The problem
We are writing a piece of code that selects a bunch of customers and sends out mailers etc (nothing mission critical). These selects often result in about 20000 records. We obviously do not want the regular hits to the customer table being blocked by these select statements.
We went down the route of making these reads readUncommitted since the operations on the data are absolutely not mission critical.
However, instead of making these massive selects if in code we make a select with a limit and an offset and keep looping would that cause less locks on the db.
In other words - would 20 select statements each retrieving 1000 records be more desirable than 1 select statement retrieving 20000 records in terms of reducing locking etc.
Any suggestions would be greatly appreciated.