Yeah, it is great, when you can come up with such optimisations.
My first job, I had to collect corporate reporting data from the business units around the world (BASIC program, 300 baud modems and a 4.33Mhz 8088 computer (or 1Ghz Z80 - the program was compiled for CP/M and MS-DOS). I managed to cut the preparation and packing time from 4 hours to under 5 minutes - by reducing the number of screen updates, instead of display each of the thousands of account lines that needed to be processed, I only output every 10, 50 then 100, each giving a significant improvement of speed. The users were a bit wary of that at first, as they couldn't see every account that was being written, but they appreciated, that they didn't have to sit for hours in front of the machine, waiting for it to finish...
My last job, we had an e-Commerce site, which was having problems, the complex query to pull out the top sellers for the home page could take up to 45 seconds to run! And that was for each user that accessed the home page! That, plus some of the shopping basket queries meant that the load-balanced 4-way cluster set-up would keel over and die with around 150 active visitors. When the PayPal newsletters used to go out, the servers and the database server would grind to a halt. Before I started, the head of e-Com would have to restart the MySQL service every couple of minutes during peak times!
I managed to optimise the query, so that it ran in under 1 second! That meant, at peak times, the load balanced set-up was able to cope with nearly 250 active sessions per server, instead of the 150 over all 4!
