Can Mysql cache calls to same function with same arguments
问题 For example I have this condition WHERE f1=CONCAT(v1,v2) OR f2=CONCAT(v1,v2) -- /*... where v1,v1 are static, then Mysql must cache result of concat after first call. If v1 is field, then Mysql must cache result of concat after first call, but only for current row. So, Mysql doing this? 回答1: No, MySQL does not cache function calls. Furthermore, such an optimization would not be worth doing. Note the tiny difference: mysql> SELECT city, country, CONCAT(city, country) FROM cities LIMIT 263000,5