MySQL Has Functions (Part 5) : PHP vs MySQL Performance
Welcome to the Part 5 – final part of the series on MySQL Functions. I hope you’ve enjoyed it(or at least found it useful so far. You might want to check out Part 1 – Date and Time Functions, Part 2 – String Functions, Part 3 – Fun With Numbers or Part 4 – Make Functions with Stored Procedures & Triggers, in case you have missed any of them. In this final part, I thought I’d take a quick look at how MySQL performs in terms of speed versus PHP.
If you remember, in Part 1 – Date and Time Functions I said that the idea behind this series was that you could use MySQL’s in-built functions to remove some of your PHP code, thereby making it cleaner and easier to maintain. I did, however, hypothesise that MySQL’s functions would be faster than the equivalent PHP, so I guess we’d better find out.