SHOW [GLOBAL|SESSION] STATUS

This statement is included for compatibility with MySQL. TiDB uses Prometheus and Grafana for centralized metrics collection instead of SHOW STATUS for most metrics.

A full description of the variables can be found here: status variables

Synopsis

ShowStatusStmt

SHOW STATUS - 图1

Scope

SHOW STATUS - 图2

ShowLikeOrWhere

SHOW STATUS - 图3

  1. ShowStatusStmt ::=
  2. 'SHOW' Scope? 'STATUS' ShowLikeOrWhere?
  3. Scope ::=
  4. ( 'GLOBAL' | 'SESSION' )
  5. ShowLikeOrWhere ::=
  6. "LIKE" SimpleExpr
  7. | "WHERE" Expression

Examples

  1. mysql> SHOW SESSION STATUS;
  2. +-------------------------------+--------------------------------------+
  3. | Variable_name | Value |
  4. +-------------------------------+--------------------------------------+
  5. | Compression | OFF |
  6. | Compression_algorithm | |
  7. | Compression_level | 0 |
  8. | Ssl_cipher | |
  9. | Ssl_cipher_list | |
  10. | Ssl_server_not_after | |
  11. | Ssl_server_not_before | |
  12. | Ssl_verify_mode | 0 |
  13. | Ssl_version | |
  14. | Uptime | 1409 |
  15. | ddl_schema_version | 116 |
  16. | last_plan_binding_update_time | 0000-00-00 00:00:00 |
  17. | server_id | 61160e73-ab80-40ff-8f33-27d55d475fd1 |
  18. +-------------------------------+--------------------------------------+
  19. 13 rows in set (0.00 sec)
  20. mysql> SHOW GLOBAL STATUS;
  21. +-----------------------+--------------------------------------+
  22. | Variable_name | Value |
  23. +-----------------------+--------------------------------------+
  24. | Ssl_cipher | |
  25. | Ssl_cipher_list | |
  26. | Ssl_server_not_after | |
  27. | Ssl_server_not_before | |
  28. | Ssl_verify_mode | 0 |
  29. | Ssl_version | |
  30. | Uptime | 1413 |
  31. | ddl_schema_version | 116 |
  32. | server_id | 61160e73-ab80-40ff-8f33-27d55d475fd1 |
  33. +-----------------------+--------------------------------------+
  34. 9 rows in set (0.00 sec)

MySQL compatibility

  • This statement is compatible with MySQL.

See also