Last time I demonstrated a case where stored procedures are slow. There were a few comments that I should include selects in the stored procedure to make the tests more realistic. From experience I already knew the answer so I didn’t go into that level of detail, but since stored procedures are all about database access this is a reasonable comment.
This is a simple stored procedure that selects data and then summarizes it by customer. No one would actually write this as it is far too easy to use a SQL statement instead. Assume the logic is more complex and can’t be done …[Read more...]