Calculations in MySQL
Letting the database server take the burden of calculations can reduce latency across a network. Most web servers, for example, not only serve up web pages, but also perform the processing for any scripts used to form those pages. If the script needs to perform calculations of large amounts of data, the processing time of the server will increase accordingly. Similar bottlenecks can occur on LANs and even desktop systems that are normally optimized for user-based interactions, not heavy data processing.
Note
Computer clusters are another matter altogether. Depending on the size of the cluster, one can lay much heavier loads on individual machines and the cluster will be able to bear the burden. While using a cluster for processing data takes the load off the database server, this can still result in latency as one part of the processing machinery (the database) may operate much slower than the rest of the parts.
MySQL provides several optimized ways of performing calculations...