BENCHMARK
BENCHMARK
The BENCHMARK() function executes the given expression repeatedly a particular no. of times.
Syntax:
BENCHMARK(count,expr)
The BENCHMARK() function executes the expression expr repeatedly count times. It may be used to time how fast MySQL processes the expression.
The result value is always 0. The intended use is from within the mysql client, which reports query execution times
Example:
SELECT BENCHMARK(100000000,now());
here, It executes a expression now() 100000000 times.
Time: (1.48 sec)
The time reported is elapsed time on the client end, not CPU time on the server end. It is advisable to execute BENCHMARK() several times, and to interpret the result with regard to how heavily loaded the server machine .
