Related Documentation Download this Manual
PDF (US Ltr) - 40.2Mb
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.1Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.1Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
MySQL 8.4 Reference Manual / ... / MySQL sys Schema / sys Schema Object Reference / sys Schema Stored Functions / The format_time() Function
Note
format_time() is deprecated, and subject to removal in a future MySQL version. Applications that use it should be migrated to use the built-inFORMAT_PICO_TIME() function instead. SeeSection 14.21, “Performance Schema Functions”
Given a 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. Depending on the size of the value, the units part isps (picoseconds),ns (nanoseconds),us (microseconds),ms (milliseconds),s (seconds),m (minutes),h (hours),d (days), orw (weeks).
mysql> SELECT sys.format_time(3501), sys.format_time(188732396662000);+-----------------------+----------------------------------+| sys.format_time(3501) | sys.format_time(188732396662000) |+-----------------------+----------------------------------+| 3.50 ns | 3.15 m |+-----------------------+----------------------------------+Related Documentation Download this Manual
PDF (US Ltr) - 40.2Mb
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.1Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.1Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb