just a heads up ... a page that was taking 38 seconds to render now renders in 0.2 seconds purely because I added indexes on the foreign key fields. I had no idea they could have such a massive effect. Bonus!
Heh, yeah. That's the difference between O(N) and O(logN). Instead of scanning every row in a table every time the database has to look for something it scans a few. Multiply that savings by the number of times something has to be joined and you'll see a big difference. A lot of people don't start to notice until their tables grow.
Originally posted by: Stinky A lot of people don't start to notice until their tables grow.
yeah, it was all groovy until the real data started getting entered 
It's also interesting to see how people optimize queries.