top of page
CerebroSQL

MySQL: 

FORMAT_PICO_TIME

FORMAT_PICO_TIME(time_val)

Given a numeric Performance Schema latency or wait time in picoseconds,
converts it to human-readable format and returns a string consisting of
a value and a units indicator. The string contains the decimal time
rounded to 2 decimal places and a minimum of 3 significant digits.
Times under 1 nanosecond are represented as whole numbers and are not
rounded.

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

Example

mysql> SELECT FORMAT_PICO_TIME(3501), FORMAT_PICO_TIME(188732396662000);
+------------------------+-----------------------------------+
| FORMAT_PICO_TIME(3501) | FORMAT_PICO_TIME(188732396662000) |
+------------------------+-----------------------------------+
| 3.50 ns | 3.15 min |
+------------------------+-----------------------------------+

bottom of page