Trips to the database are extremely fast, the bottlenecks are in the queries which is why they pay people the big bucks to optimize them. In the converted relational algebra to get a random saying, all you have is a single projection operation which is probably passed into a mersenne twister (or whatever random generator mysql uses), no sigmas, intersections, unions, cartesian products, or tuple joins; which is where inefficiency comes into play (even moreso with myisam). Pretty much all you're waiting for is the rotational delay of the hard drive and a single block transfer time. If we were really worried about database workload I imagine the project would have switched to something more robust like postgresql ages ago.
|