Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Commit c39d821

Browse files
1 parent f10a974 commit c39d821

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

docs/concepts/query-insights.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Query Insights'
33
subtitle: 'Find and optimize long-running queries in your application, anomalies in your database, and more.'
4-
date: '2024-02-28'
4+
date: '2024-08-14'
55
---
66

77
## Overview
@@ -87,7 +87,12 @@ You may see some placeholder values in the queries, such as `:v1`. This is becau
8787
You have the option to [opt in to complete query collection](#complete-query-collection) to see the full SQL statements.
8888
{% /callout %}
8989

90-
You may also see a red shards icon next to some queries. This signifies that the query requires execution across multiple shards.
90+
You may also see one or more orange icons next to some queries.
91+
92+
- A shard icon indicates that the query requires execution across multiple shards.
93+
- An exclamation point icon indicates that the query is not currently using an index and requires a full table scan.
94+
95+
Hovering over the icon will show a tooltip with information about the meaning of the icon.
9196

9297
This query overviews table shows the same data for all graph tabs except for [Anomalies](/docs/concepts/anomalies) and [Errors](#errors). For more information about the content for each of those, refer to each Anomalies and Errors sections above.
9398

@@ -111,7 +116,7 @@ You can also sort the columns for quick analysis by clicking on the title at the
111116

112117
### Query filtering
113118

114-
The search bar above the table allows you to filter queries as needed. You can filter for query SQL, table name, tag name, tag value, user name, query count, query latency, multisharded queries, and [Boosted](/docs/concepts/query-caching-with-planetscale-boost) queries. Click on the `?` next to the search bar for the full list of search syntax.
119+
The search bar above the table allows you to filter queries as needed. You can filter for query SQL, table name, tag name, tag value, user name, query count, query latency, multisharded queries, index name, if the query was indexed, and [Boosted](/docs/concepts/query-caching-with-planetscale-boost) queries. Click on the `?` next to the search bar for the full list of search syntax.
115120

116121
### Query deep dive
117122

@@ -127,7 +132,13 @@ If you'd like to further interact with the query, click "Open query in web conso
127132

128133
#### Additional query information
129134

130-
Beneath the query pattern is a graph with more information about the query. The set of available metrics/tabs is the same as the main database-level metrics graphs: Query latency, Queries, Rows read, Rows written, and Errors.
135+
Beneath the query pattern is a graph with more information about the query. The set of available metrics/tabs include: Query latency, Queries, Rows read, Rows written, Errors and Indexes. The Indexes graph (which is not show on the database-level page) shows the percentage of queries that used each of the listed indexes in each time bucket. Currently only `SELECT` queries show index usage information
136+
137+
Beneath the time series graphs you will see summary statistics for the query pattern. These data are scoped to the same time period shown in the main query pattern graphs. The available metrics have the same definitions as the query statistics listed in the main insights tab.
138+
139+
`SELECT` queries include a horizontal bar graph that shows the cumulative usage of each index over the complete time period shown in the main query pattern graphs.
140+
141+
To change the time period reflected in the graphs and summary statistics, click and drag to restrict the time window, or click on one of the day icons above the graph to select a different day.
131142

132143
#### Notable queries
133144

0 commit comments

Comments
 (0)