dolthub / dolthub/dolt

Initial support for `show status`

Open
#7,646 1 comment 0 reactions 0 assignees View on GitHub
correctness customer issue enhancement
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

MySQL's [`SHOW STATUS` statement returns server status information](https://dev.mysql.com/doc/refman/8.3/en/show-status.html) from the available [server status variables](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html).

Note that [server status variables](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html) are different from system variables – the current implementation of `show status` in GMS simply returns system variables, which doesn't match MySQL's behavior.

We can stub out all the existing MySQL server status variables, but we should prioritize implementing the following status vars, to enable customers to better monitor server performance using standard MySQL queries:
- `Questions` – [The number of statements sent to the server by clients.](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Questions)
- `Com_insert`, `Com_update`, and `Com_delete` – [The number of times each type of statement has been executed.](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Com_xxx)
- `Threads_connected` – [The number of currently open connections](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Threads_connected)
- `Threads_running` – [The number of threads that are not sleeping](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Threads_running)
- `Connection_errors_internal` – [The number of connections refused due to internal errors in the server, such as an out of memory condition.](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Connection_errors_internal)
- `Aborted_connects` – [The number of failed attempts to connect to the MySQL server.](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Aborted_connects)
- `Connection_errors_ max_connections` – [The number of connections refused because the server `max_connections` limit was reached.](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Connection_errors_max_connections)
- `Slow_queries` – [The number of queries that have taken more than `long_query_time` seconds.](https://dev.mysql.com/doc/refman/8.3/en/server-status-variables.html#statvar_Slow_queries)

This came in as a customer request – a customer wants to query these server status variables (through [Datadog's MySQL integration](https://docs.datadoghq.com/integrations/mysql/?tab=host)) in order to see the operational metrics from the variables listed above. The initial list of status variables comes from [Datadog's recommended set of most important MySQL perf metrics to monitor](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.