Documentation forSolarWinds Observability

Queries Explorer

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 a filter

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.

Query Panel

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.

Overview

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. Wait statistics charts are displayed for SQL Server, MySQL, and PostgreSQL including a Wait time chart and Wait time breakdown. 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.

View wait time statistics in the Wait Time charts

Wait times are displayed in a visual line chart and bar chart detailing waits for SQL Server, MySQL and PostgreSQL database instances over the selected time period.

  • Wait Time : Line chart displaying the total wait time for queries over the selected time period.

  • Wait Time Breakdown : Bar chart displaying the total wait time percentage for each query.

View database entity trends in the Top 10 Service Breakdown charts

The Top 10 Service breakdown displays 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 Explorer Overview 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.

View query activity in the Top 5 Hosts running this query charts

Displays 3 charts about the top 5 hosts running the selected query which gives you information about the query's performance.

  • 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.

View high-level performance metrics in the Workload Overview

The workload overview charts display metrics related to your database's overall performance for the selected time period. 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.

View query stats in the 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.

View full query text in the Query Digest

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.

Samples

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:

Metric Description
Sample Text Displays a recorded query sample of the selected query.
Sample Insights Displays a colored dot indicating whether a sample has explain plans (blue), warnings (yellow), or errors (red).
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.

Sample Details

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.

Visualize costly query operations with the Visual Explain Plan

Quickly discover any costly node or operation in your samples with the Visual Explain Plan. Open any Sample Details pane for a sample that contains an Explain Plan. Click Visual Explain Plan on the Explain Plan tab to display the Visual Explain Plan. The visually represented Explain Plan should be read right to left, with nodes displaying beginning query operations all the way through to the query's completed execution. Each node has a numbered cost and percentage displaying its individual operation cost within the query. Nodes are color coded as follows.

Color Meaning
Red Query node/operation costs greater than 50 percent of total query operation.
Yellow Query node/operation costs between 10 and 50 percent of total query operation.
Green Query node/operation costs below 10 percent of total query operation.

Red nodes represent the mostly costly parts of your query, and let you see which areas in the query could use optimization. Click a node to display detailed metrics about the query operation such as the logical operation name, estimated cpu cost, estimated rows affected, estimated I/O, and estimated execution mode. Adjust the Visual Explain Plan view with the zoom bar and directional buttons.

Click the Plan Meta data button to display Explain Plan details such as the Build number, statement cost, statement rows, whether the plan was retrieved from the cache, and the statement type.

Click X to return to the Sample Details Explain Plan tab.

Advisors

Click Advsiors to open the Advisors tab for the selected query.

The Advisors Summary details the total recommendation count, displaying the advisor checks that failed and are actionable to improve database best practices. The Advisors tab displays whether the advisor categories are informational (blue), critical (red), or cautionary (yellow). Critical recommendations should take priority, and require you to optimize an aspect of your database for improved database performance.

Advice categories are displayed beneath the Summary, and provide you with recommendations grouped into specific database categories. Use the Advice categories to filter for specific database aspects that you may want to optimize. For example, you could expand the MySQL Configuration category to see any critical, cautionary, or informational recommendations. Each recommendation category has its own count, with listed recommendations underneath the category. Expand any recommendation to view affected database(s) by ID, their status, and an explanation of the recommendation. Click any database ID to filter the view for that database, and see all the advisor checks for that database.

Click Overview to return to the Overview.

Click Queries to return to the Queries Explorer.