-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(mysql): [DO NOT MERGE] Database Monitoring for MYSQL Query Performance Monitoring [Feb Release] #19935
base: develop
Are you sure you want to change the base?
feat(mysql): [DO NOT MERGE] Database Monitoring for MYSQL Query Performance Monitoring [Feb Release] #19935
Changes from all commits
3fd0959
a9a847b
d74787b
4cf309b
ba88d9a
082a601
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,188 @@ | ||||||
--- | ||||||
title: Query-level monitoring | ||||||
tags: | ||||||
- Infrastructure | ||||||
- Manage your data | ||||||
- Query-level analysis | ||||||
- Query-level monitoring | ||||||
- Birds-eye view | ||||||
- Wait-time analysis | ||||||
- MySQL monitoring | ||||||
- PostgreSQL monitoring | ||||||
metaDescription: How to user database dashboards to monitory query-level performance. | ||||||
freshnessValidatedDate: never | ||||||
--- | ||||||
|
||||||
|
||||||
Query-level analysis in New Relic is designed to empower Database Administrators (DBAs) and other IT professionals to get detailed insights into how individual SQL queries perform. This capability helps identify and troubleshoot issues such as slow response times, high system load, and latency, directly from the database's instrumentation, without relying solely on Application Performance Monitoring (APM) agents. It addresses key pain points by offering comprehensive data, visualization tools, and actionable recommendations for query optimization. Additionally, you can drill down into specific queries to identify root causes of performance degradations. | ||||||
|
||||||
|
||||||
Benefits of using New Relic query-level analysis: | ||||||
|
||||||
* **Performance Optimization:** Identifies slow or inefficient queries that can be optimized for better performance. | ||||||
* **Resource Management:** Provides insights into resource usage, helping in the efficient allocation of CPU, memory, and I/O resources. | ||||||
* **Problem Diagnosis:** Facilitates the identification and resolution of issues causing application slowdowns or failures. | ||||||
|
||||||
|
||||||
## Access the query-level dashboard [#access] | ||||||
|
||||||
You can access the query-level dashboard from the **left pane > All Capabilities > Dashboards** in your New Relic account. | ||||||
|
||||||
* Integrate then configure your database to New Relic for query-level monitoring. For more information, refer: | ||||||
* [PostgreSQL integration](/install/postgresql) | ||||||
* [MySQL integration](/install/mysql) | ||||||
* [Microsoft SQL integration](/install/microsoft-sql) | ||||||
|
||||||
**To access the query-level dashboard:** | ||||||
|
||||||
1. Log-in to your New Relic Account. | ||||||
2. Go to **All capabilities > Dashboards**. | ||||||
3. Select your database dashboard. | ||||||
|
||||||
LATEST IMAGE IS REQUIRED | ||||||
|
||||||
## Using the query-level dashboard [#using-query-dashboard] | ||||||
|
||||||
Query-level analysis involves examining individual SQL queries within a database to assess their performance and impact. It provides insights into execution times, resource consumption, and potential bottlenecks, enabling users to optimize database operations. | ||||||
|
||||||
The New Relic query-level dashboard has three tabs: | ||||||
|
||||||
* [Bird's-Eye View](#bird-view) | ||||||
* [Query details](#query-details) | ||||||
* [Wait time analysis](#wait-time) | ||||||
|
||||||
|
||||||
|
||||||
### Bird-eye view [#bird-view] | ||||||
|
||||||
The Bird's-Eye View provides a high-level overview of database performance, enabling users to quickly identify areas that require attention. It highlights key performance indicators such as execution times and wait events. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
#### Use of bird-eye view [#use-bird-view] | ||||||
|
||||||
* Identify databases with high average execution times or significant wait events using the widgets. | ||||||
* Analyze trends in execution counts and disk I/O to correlate with performance issues. | ||||||
* Use blocking details to resolve queries causing or experiencing locks. | ||||||
|
||||||
### Widgets of Bird-Eye View [#widget-bird] | ||||||
|
||||||
The Bird's-Eye View has the following widgets: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
<table> | ||||||
<thead> | ||||||
<tr> | ||||||
<th>Widgets</th> | ||||||
<th>Description</th> | ||||||
</tr> | ||||||
</thead> | ||||||
<tbody> | ||||||
<tr> | ||||||
<td>Database</td> | ||||||
<td>Displays a list of all monitored databases, offering a quick assessment of their performance status.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Average Execution Time (ms)</td> | ||||||
<td>Displays a list of average times taken for queries to execute, helping identify underperforming queries.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Execution Counts Over Time</td> | ||||||
<td>Visualizes query execution frequency, aiding in identifying patterns or spikes that indicate performance issues.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Top Wait Events</td> | ||||||
<td>Displays a list of the most frequent wait events affecting performance, such as I/O waits or lock waits.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Top N Slowest</td> | ||||||
<td>Highlights the slowest-performing queries across databases to prioritize optimization efforts.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Disk IO Usage (Avg Disk Reads)</td> | ||||||
<td>Monitors the average disk read operations to assess their impact on performance.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Disk IO Usage (Avg Disk Writes)</td> | ||||||
<td>Monitors the average disk write operations to assess their impact on performance.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Blocking Details</td> | ||||||
<td>Provides information on blocked and blocking sessions to address lock-related issues.</td> | ||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
|
||||||
|
||||||
|
||||||
### Query details [#query-details] | ||||||
|
||||||
The Query Details tab allows users to drill down into individual query executions, providing detailed metrics and execution plans to optimize performance. | ||||||
|
||||||
#### Use of Query Details [#use-query-details] | ||||||
|
||||||
* Identify queries with high resource usage using the Individual Query Details widget. | ||||||
* Analyze execution plans to detect inefficiencies and implement recommended optimizations. | ||||||
|
||||||
#### Widgets of Query Details [#widget-query] | ||||||
|
||||||
The Query Details has the following widgets: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
<table> | ||||||
<thead> | ||||||
<tr> | ||||||
<th>Widgets</th> | ||||||
<th>Description</th> | ||||||
</tr> | ||||||
</thead> | ||||||
<tbody> | ||||||
<tr> | ||||||
<td>Slow Query Samples</td> | ||||||
<td>Displays the slow-running queries, including execution times and query information. This widget helps to identify queries that consistently perform poorly and require optimization.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Query Execution Plan Details</td> | ||||||
<td>Provides detailed metrics for each query execution, including CPU usage, memory consumption, and execution times. This helps in diagnosing performance issues and identifying resource-intensive queries.</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
|
||||||
|
||||||
### Wait time analysis [#wait-time] | ||||||
|
||||||
The Wait Time Analysis tab helps users understand and mitigate delays impacting query performance. | ||||||
|
||||||
#### Use of Wait Time Analysis [#use-wait-time] | ||||||
|
||||||
* Focus on addressing the most impactful wait events using the Top Wait Events widget. | ||||||
* Use Trend of DB Instance Wait Times to identify periods of increased wait times. | ||||||
* Access Wait Query Details to diagnose sources of delays and prioritize queries for optimization. | ||||||
|
||||||
#### Widgets of Wait Time Analysis [#widget-wait] | ||||||
|
||||||
The Wait Time Analysis has the following widgets: | ||||||
|
||||||
<table> | ||||||
<thead> | ||||||
<tr> | ||||||
<th>Widgets</th> | ||||||
<th>Description</th> | ||||||
</tr> | ||||||
</thead> | ||||||
<tbody> | ||||||
<tr> | ||||||
<td>Top Wait Events</td> | ||||||
<td>Displays total wait times for different events, such as I/O or lock waits, using a line chart.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Web Events</td> | ||||||
<td>Displays a count of unique wait events to understand their diversity and frequency.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Trend of DB Instance Wait Times</td> | ||||||
<td>Tracks changes in wait times over a specified period to identify trends.</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Wait Query Details</td> | ||||||
<td>Provides detailed information on queries associated with significant wait events.</td> | ||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
|
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.