rewrite oxmysql docs

This commit is contained in:
Linden committed 2023-05-31 21:23:24 +10:00
1 parent 864a1b3858
commit 3298244c9a
17 files changed
+630 -520

No files matched your search

+12 -21
View File
@@ -1,25 +1,22 @@
---
title: Using the Debug UI
title: Using the debug UI
---
Debug UI can show you useful information about your queries such as the total query time, count and total number of slow queries.
You can also see which resources take up the most query time, the number of queries they ran and how many were slow.
## Requirements
The debug UI lets you easily see all the queries that have been executed by resources, query response times, and per-resource statistics.
You should only enable this during production, or with a small player count - for larger servers, look into builtin MySQL logging.
Before using the UI first you have to make sure you have the `mysql_ui` convar set to true:
```yaml
```bash
set mysql_ui true
```
Also make sure that you have `command` ace permission access, then you should be able to use the `mysql` command in game to open up the UI and see your query data.
Also make sure that you have `command` or `command.mysql` ace permission access, then you should be able to use the `mysql` command in game.
:::info
:::tip
You _do not_ need to have the `mysql_debug` enabled to use the debug ui.
You *do not* need to have the `mysql_debug` convar set to `true` in order to use the debug ui.
:::
## Main page
@@ -29,24 +26,18 @@ along side a pie chart which shows what resources took the most query time.
![oxmysql_ui_main](https://i.imgur.com/iQqWELJ.png)
## Resource page
The resource page shows you all the queries and their execution time inside a table that the resource previously ran,
alongside the total amount of the queries, execution time and slow queries for the selected resource.
Columns can be sorted by ascending and descending order.
Columns can be sorted by ascending and descending order, and hovering over a query will display the full query inside a tooltip.
Hovering over a query will display the full query inside a tooltip.
:::info
Queries that exceed `mysql_slow_query_warning` (default 150ms) are displayed in orange.
For demonstation purposes the `mysql_slow_query_warning` convar was set to 5 here.
![oxmysql_ui_queries](https://i.imgur.com/gZpJoIg.png)
:::tip
Queries that exceed the value set in the `mysql_slow_query_warning` convar (defualt is 150) are going to show up as orange
and will be added to the slow queries count.
:::
*Note: For demonstation purposes the `mysql_slow_query_warning` convar was set to 5 here.*
![oxmysql_ui_queries](https://i.imgur.com/gZpJoIg.png)