By piccoloprincipe
via thenazg.blogspot.it
Published: Nov 02 2012 / 09:16
When you're deep in code and realize that each item of a batch needs to check some other info from somewhere else, the most straightfoward way to get the info you need is to just fetch what you need right there. However, this tends not to scale well... doing one-hit lookups for each item from a batch of 100 isn't bad, but when that batch becomes 10,000? 100,000? A database connection can execute an individual SQL only so fast... 10,000 of them will add up on the clock.
Add your comment