BENCHMARK

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 .

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.