top of page
CerebroSQL

BENCHMARK

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Syntax:
BENCHMARK(count,expr)

The BENCHMARK() function executes the expression expr repeatedly count
times. It may be used to time how quickly MySQL processes the
expression. The result value is 0, or NULL for inappropriate arguments
such as a NULL or negative repeat count.

The intended use is from within the mysql client, which reports query
execution times:

URL: https://dev.mysql.com/doc/refman/8.0/en/information-functions.html

Example

mysql> SELECT BENCHMARK(1000000,AES_ENCRYPT('hello','goodbye'));
+---------------------------------------------------+
| BENCHMARK(1000000,AES_ENCRYPT('hello','goodbye')) |
+---------------------------------------------------+
| 0 |
+---------------------------------------------------+
1 row in set (4.74 sec)

bottom of page