25

The other day, I customer of ours asked me to try to improve the performance of an application of his in a particular method. The method in question taking more than 5 minutes.
I took a look at what it did in the profiler, and it shocked me. More than 100k selects to the database, to retrieve 116 records...
I took a look at the code... Scores of selects in nested loops inside other nested loops inside of... That seemed normal to them...
At the end after we improved it's performance it took 3 seconds...
What shocks me the most is that the customer is a developer himself, really knowledgeable and has an order of magnitude more experience than I do. Am I too anti "worthless database round-trips"? Is that normal? :S

Comments
  • 14
    That's what happens when people discount the importance of database management. I know a lot of devs with "that's not my job to know" attitudes towards dealing with anything from database design to actual retrieval of data. Shocking and scary to think of how inefficiently and probably wrongly the data gets handled in many places.
  • 0
    It is not normal. More efficient = better. Congratulations on fixing it!
Add Comment