It's really hard to say what the performance issue was here, but my experience is that SQL servers do a really good job of handling data sets if you use them correctly. If the problem was a "cache miss" it might mean that one or more tables needs proper indexes for example. Or, if the code involves a cursor and a code loop, that is a very bad sign.