thumbtacks wrote:The loops are still there...but they are abstracted away.
Well, although I have not ever sat down at looked at how a database operates on the backend (as far as how the actually data is sorted through in response to a SQL query) I would surmise that there is some type of looping going on. Some day I'll do that. I
suppose I could look at some open source implementation of a database and pore over the code on my own. But I would guess that in order to move through a massive collection of data (thousands of entries let's say), you have to do some type of looping...although
it is an intelligent, guided type of looping based on the SQL syntax. Although it's not hard to write sloppy SQL and watch a query stall out for several minutes and return thousands of records when it should only return a few.
From the interviews that Andres did, there is some kind of enumeration that goes on, but its optimized to be efficient. It uses lambda expressions and expression trees to retrun results using many threads.
Now they will multiply the speed and efficiency with the use of pLINQ which will take advantage our new multi-core world.