BENCHMARK( )

Use this MySQL function to evaluate the performance of a MySQL server.

Syntax

Below is the syntax for this command. Text within square brackets (i.e, [ and ] ) are optional. Choices are separated by bars (i.e, | ). Ellipses preceded by a comma indicates a repeating pattern. Ellipses before or after syntax are used to highlight a relevant except from the larger syntax. Text displayed in italic letters represent text that should be replaced with the specific names related to the database (e.g., column with the name of the column).

BENCHMARK(number, expression)

Explanation

Use this function to evaluate the performance of a MySQL server. The expression given as the second argument of the function is repeated for the number of times given in the first argument. The results are always 0. It's the processing time reported that is meaningful. This function is meant to be used from within the mysql client.

Examples

SELECT BENCHMARK(1000000,PI( ));

+--------------------------+
| BENCHMARK(1000000,PI( )) |
+--------------------------+
|                        0 |
+--------------------------+
1 row in set (0.04 sec)

SELECT BENCHMARK(1000000,PI( ));