-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard add slow query analyst #2048
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...ebula-dashboard-ent/4.cluster-operator/analysis-diagnosis/slow-query-analyst.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Slow query analyst | ||
|
||
In the daily work of DBAs, they need to analyze and govern the execution of query statements of the cluster. NebulaGraph Dashboard supports viewing the slow queries, including statements, duration, categories, execution plans, etc. | ||
whitewum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Features | ||
|
||
- Display the information about current slow queries. Users can filter slow queries by keywords and graph space. | ||
- Display the history of slow queries. Users can filter the records according to keywords, graph space, category, and time range. | ||
|
||
## Prerequisites | ||
|
||
`enable_record_slow_query`=`true` is set in the graph service configuration of NebulaGraph. For details, see [Graph service configuration](../../../5.configurations-and-logs/1.configurations/3.graph-config.md). | ||
|
||
## Entry | ||
|
||
1. In the top navigation bar of the Dashboard Enterprise Edition page, click **Cluster Management**. | ||
2. On the right side of the target cluster, click **Detail**. | ||
3. In the left navigation bar, click **Analysis**->**Slow Query Analyst**. | ||
|
||
## View current slow queries | ||
|
||
Clicking the **Running** tab will display the current slow queries. The parameters are described as follows. | ||
|
||
|Parameter|Description| | ||
|:--|:--| | ||
|Query|The statement of the slow query.| | ||
|Duration(μs)|The duration that the slow query has been executed.| | ||
|Start Time|The time that the slow query starts executing.| | ||
|Status|The status of the slow query, including `running` and `killing`.| | ||
|User|The user name to execute the query. | | ||
|Host|The address and port of the server that the user connected to.| | ||
|Action| Supports killing the slow query.| | ||
|
||
## View slow query history | ||
|
||
Clicking the **History** tab will display the slow query history. The parameters are described as follows. | ||
|
||
|Parameter|Description| | ||
|:--|:--| | ||
|nGQL|The statement of the slow query.| | ||
|Duration(μs)|The duration of the slow query.| | ||
|Category|The type of the slow query statement, including `DDL`, `DQL`, `DML`, `DCL`, `UTIL` and `UNKNOWN`.| | ||
|Space|The name of the graph space where the slow query was executed.| | ||
|Record Time|The time to record the statement into memory as a slow query.| | ||
|Action|Supports viewing the execution plan, making it easy for the DBA to optimize slow query statements based on the execution plan.| | ||
|
||
!!! note | ||
|
||
Turning off the slow query analyst function **will not** clear the slow query history. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
analysis?