Pages

12 May 2016

Best Way to Process Data in the Database

On the one hand, you have concurrency or splitting the work up across many INSERT statements or threads.

And on the other have, you have a single large batch process like one large INSERT statement.

This is based on my experience, based on hard facts, based on even harder science which is based on my opinions and patterns that I have noticed.

The 'Sweet Spot' would be mostly batch processing with a sprinkle of concurrency.

Another way to look at it is "chunking". You need to break down the work into chunks that are big enough to optimally use the database and what it is good and small enough that it does not bog down the database.