If you are monitoring databases with SolarWinds Observability, you can see a list of observed queries for a selected period by going to Databases > Queries. This displays observed queries with syntax highlighting for the selected time period by total time, allowing you to determine which queries are consuming the most time. Queries observed within the last hour are displayed by default.
Apply filters to the Queries Explorer to easily find queries under your desired parameters.
Click the No Filter drop-down menu, select the desired filter, and then click Apply to filter the available queries by your selection. You can currently filter by the Errors, Warnings, Missing Indexes, and Slow Response Times categories.
Search for specific query text using the search bar. Enter your query text or phrase and then click Apply to filter the queries.
Click the New queries only toggle and then click Apply to filter by only newly recorded queries.
Click the Hide Internal Queries checkbox to hide internal queries executed by SolarWinds Observability. This option is active by default.
Click the desired query to open the Query Preview panel. The Query Preview displays the full query text with syntax highlighting for the selected query, and details about the query including the Query ID, First Seen date, and Database Host(s) where the query was observed.
Click Copy To Clipboard to copy the query text.
Click View Details to open the Query details view for the selected query.
Query details view
The Query details view displays detailed information about the selected query. The Query details view contains two tabs, the Overview which displays by default, and the Samples tab.
The Query Details Overview displays detailed information about the selected query. The full query text is displayed along the top of the page, with Quality of Service charts including Avg. Response Time/P99, Throughput, and Errors displayed at the top of the page. The Top 10 Service breakdown displays three dimensions of data by Database or Top Query with a bubble chart and tabular data representation. The Top 5 Hosts running this query charts display the top hosts that executed the query by total time, by count, and by errors. The Workload Overview chart is displayed at the bottom of the overview with selectable options including Response Time, Throughput, Error Rate, and Load. Each graph displays information for the selected query through the selected time period. See Database metrics for information about standard visualizations of metric data. In addition to the standard visualizations of metric data, the following widgets are available.
Top 10 Service Breakdown
Bubble charts and a tabular data breakdown showing three dimensions of data by Database, or Top Query, to understand a relationship or trend between the entities. The Database Instances by count is displayed in the bubble chart and tabular data breakdown by default. Select the drop-down menu to adjust the chart selection. Each chart displays the following data for the selected category:
- Database Instances by count: Database instances monitored with SolarWinds Observability organized by query count.
Database Instance by Total Exec Time: Database instances monitored with SolarWinds Observability organized by total query execution time.Hover over a bubble in the Bubble Chart representation to display the additional metrics below.
Execution Time: Time Spent executing queries.
Queries Count: Total number of queries executed in the selected time period.
Load: The percentage of total time which this instance contributed to the total execution time.
Errors: Total number of errors for this time period.
Click a database name within the tabular data breakdown graph to apply a filter of your selection to the Overview. For example, if you clicked a database instance mysql on ip 192xxx from the service breakdown, you would filter the Queries ExplorerOverview by that mysql on ip 192xxx database instance selection.
Click a database name on the bubble chart breakdown legend to only display information on the chart for that selection. For example, if you clicked database instance SD-temp on the legend, you would only display information for SD-temp in the Top 10 Service breakdown bubble chart.
Top 5 Hosts running this query
Displays 3 charts about the top 5 hosts running the selected query.
By Total Time: Displays the time taken to execute the query by each of the top 5 hosts.
By Count: Displays the number of successful database transactions for the query by each of the top 5 hosts.
By Errors: Displays the number of failed database transactions for the query by each of the top 5 hosts.
The Response time chart is displayed by default. Click the drop-down to display any of the following charts in the Workload Overview chart.
Response Time: Displays the amount of query latency in milliseconds per query execution for the selected time period.
Throughput: The number of queries or statements completed per second. This is a metric of traffic intensity and frequency, showing how many requests your servers are processing.
Error Rate: The total number of errors returned per second across all of your monitored databases. Incorrect database responses may indicate request are failing, while throughput and response time appear healthy.
Load: Displays the load on your service, as a number of requests executing simultaneously. Concurrency reveals load (or service demand) in a way that is orthogonal to variations in request speed or frequency.
Query Details Widget
The Query Details Overview page displays identifiers for the selected query. The following identifiers are displayed:
Query ID: Displays a unique query identification number for the selected query.
First Seen: Displays the date and time the query was first observed by SolarWinds Observability.
Last Seen: Displays the date and time the query was last observed by SolarWinds Observability.
Number of Samples: Displays the number of query samples for the query.
Tags : Displays tags associated with the selected query.
Users : Displays users associated with the selected query.
Click the query text to open the Query Digest. The Query Digest displays the full query text in an easy to read format. Click Copy To Clipboard to copy the query text.
SolarWinds Observability captures raw samples of the queries that are sent to your monitored database in addition to aggregate query metrics. This provides richer detail into query activity, especially slow queries or queries which generate errors, and also lets you examine execution plans for opportunities for optimization. The Samples page allows you to answer questions such as:
What queries did this user run which took longer than 2 seconds?
What slow queries use this database?
What queries did this client run?
From the Query Details Overview page, click Samples to open the Samples page for the selected query. The Samples page displays captured query samples for the selected query and details about the query execution.
The following details are available:
|Sample Text||Displays a recorded query sample of the selected query.|
|Database||Displays the database that the query was executed against.|
|User||Displays the user(s) that executed the query.|
|Origin||Displays the IP address and port of the client that issued the query.|
|Timestamp||Displays the day and time when the query sample was created.|
|Latency||Displays the average latency for the query sample in milliseconds.|
|Connection ID||Displays the unique connection identifier.|
|Trace ID||The trace id associated with the query sample. Click the TraceId link to open the Traces Explorer for your selection. See Trace context in queries for more information.|
The Samples by Latency chart, and the Samples grid display recorded query samples for the last hour by default. Query samples are color-coded to help you to quickly identify samples that have errors, warnings, or explain plans. The Samples by Latency chart also displays the average latency and p99 latency for the recorded query samples.
Filter for specific sample text, database, user, origin, minimum latency, maximum latency, connection ID, or a combination of options using the search bar. Click Clear All to clear the filter and return to the collected default samples.
Click the Sync with table pagination toggle to sync the results of the chart with the All Samples table below.
Filter the Samples by latency chart by the Top 250, or Top 500 queries to identify big picture patterns for your recorded query samples, allowing you to optimize your database's performance. Further adjust the query samples by samples with errors, or samples with warnings to identify problematic queries that require more attention. Click Reset to return the Samples by Latency chart to its default state.
Click a bubble in the chart, or a sample from the table to display the Sample Details Overview for your selection. Query sample details are displayed on the Sample Details Overview tab, with full query sample text. Click View Details to open the Queries Explorer for the selected query sample.
Click Explain Plan to display the Sample Explain Plan for your selection. The RAW Explain Plan is displayed by default with syntax highlighting. Click Copy to Clipboard to copy the Explain Plan.
Click Table View to display the sample Explain Plan in an easy to read detailed format. The Explain Plan Table will display different metrics based on the selected query sample.
Click Overview to return to the Overview.
Click Queries to return to the Queries Explorer.