Performance Schema Functions As of MySQL 8.0.16, MySQL includes built-in SQL functions that format or retrieve Performance Schema data, and that may be used as equivalents for the corresponding  sys  schema stored functions. The built- in functions can be invoked in any schema and require no qualifier, unlike the  sys  functions, which require either a  sys.  schema qualifier or that  sys  be the current schema. The built-in functions supersede the corresponding  sys  functions, which are deprecated; expect them to be removed in a future version of MySQL. Applications that use the  sys  functions should be adjusted to use the built-in functions instead, keeping in mind some minor differences between the  sys  functions and the built-in functions. For details about these differences, see the function descriptions in this section. Given a numeric byte count, converts it to human-readable format and returns a string consisting of a value and a units indicator. The string contains the number of bytes rounded to 2 decimal places and a minimum of 3 significant digits. Numbers less than 1024 bytes are represented as whole numbers and are not rounded. The units indicator depends on the size of the byte-count argument as shown in the following table. FORMAT_BYTES()  was added in MySQL 8.0.16. It may be used instead of the  sys  schema format_bytes()  function, keeping in mind this difference: 2434 • FORMAT_BYTES()  uses the  EiB  units indicator.  sys.format_bytes()  does not. • FORMAT_PICO_TIME( time_val ) mysql>  SELECT FORMAT_BYTES(512), FORMAT_BYTES(18446644073709551615); +-------------------+------------------------------------+ | FORMAT_BYTES(512) | FORMAT_BYTES(18446644073709551615) | +-------------------+------------------------------------+ | 512 bytes | 16.00 EiB | +-------------------+------------------------------------+ • FORMAT_BYTES( count ) Table 12.27 Performance Schema Functions Name Description Introduced FORMAT_BYTES() Convert byte count to value with units 8.0.16 FORMAT_PICO_TIME() Convert time in picoseconds to value with units 8.0.16 PS_CURRENT_THREAD_ID() Performance Schema thread ID for current thread 8.0.16 PS_THREAD_ID() Performance Schema thread ID for given thread 8.0.16 Argument Value Result Units Result Units Indicator Up to 1023 bytes bytes Up to 1024$^{2}$  −  1 kibibytes KiB Up to 1024$^{3}$  −  1 mebibytes MiB Up to 1024$^{4}$  −  1 gibibytes GiB Up to 1024$^{5}$  −  1 tebibytes TiB Up to 1024$^{6}$  −  1 pebibytes PiB 1024$^{6}$ and up exbibytes EiB