@@ -9,18 +9,21 @@ cloud_ui:
99 - [services, :serviceId, metrics]
1010---
1111
12+ import EarlyAccess from "versionContent/_ partials/_ early_access.mdx";
13+
1214# Service metrics
1315
1416You can view your service metrics from the Timescale
1517[ metrics dashboard] [ metrics-dashboard ] . This dashboard gives you service-level
1618information, such as CPU, memory, and storage usage.
1719
18- You can also view your query-level statistics by using the pre-installed
20+ You can view query-level statistics from the ` Query stats ` tab. You can also
21+ view your query-level statistics by using the pre-installed
1922[ ` pg_stat_statements ` ] [ pg-stat ] extension from a PostgreSQL client.
2023
2124## Metrics dashboard
2225
23- Timescale provides a Metrics dashboard for managing your services. You can
26+ Timescale provides a metrics dashboard for managing your services. You can
2427see the Metrics dashboard in your Timescale account by navigating to the
2528` Services ` section, clicking the service you want to explore, and selecting the
2629` Metrics ` tab.
@@ -89,6 +92,48 @@ increase your storage capacity, or reduce the size of your database. When you
8992have done that, you can also add a retention policy, or turn on compression, to
9093avoid the problem occurring again in the future.
9194
95+ ## Query-level statistics in the Timescale dashboard
96+
97+ You can analyze your queries by navigating to the ` Query stats ` tab from the
98+ Services dashboard.
99+
100+ <EarlyAccess />
101+
102+ Use the filter at the top of the page to view details of your queries, including
103+ how many rows the query returned, and the time the query took to run.
104+
105+ <img class="main-content__ illustration"
106+ src="https://s3.amazonaws.com/assets.timescale.com/docs/images/tsc_querystats_expanded.webp "
107+ width={1375} height={944}
108+ alt="The Timescale query stats viewer showing the statistics for a recent query" />
109+
110+ In the results window, use the horizontal scroll bar at the bottom of the screen
111+ to see statistics for your query. You can also use the arrow to the left of the
112+ query to expand it. The columns show these details about your queries:
113+
114+ | Column| Description|
115+ | -| -|
116+ | Executions| Number of times the query has been run during the results period|
117+ | Total rows| Total number of rows scanned, inserted, or updated by the query during the results period|
118+ | Median rows| Median number of rows touched each time the query is run|
119+ | P05 time| The fifth percentile, or the minimum time this query took|
120+ | Median time| Median number of microseconds (µs) or milliseconds (ms) it took to run the query|
121+ | P95 time| The ninety-fifth percentile, or the maximum time this query took|
122+ |Median memory|Median amount of memory consumed by the query
123+ | P95 memory| The ninety-fifth percentile, or the maximum memory this query used|
124+ | Median bytes read| Median number of bytes used each time the query is run|
125+ | P95 bytes read| The ninety-fifth percentile, or the maximum number of bytes this query used|
126+ | Cache hit ratio| Ratio of memory used compared to disk used, as a percentage. Calculated as ` cache hit / (cache hit + cache miss) ` .|
127+ | Hypertables| A green check mark is shown if results were drawn from a hypertable|
128+ | Compressed tables| A green check mark is shown if results were drawn from a compressed table|
129+ | User name| Username of the logged in user running the query|
130+
131+ <Highlight type =" note " >
132+ If you have just completed a query, it can take a minute or two for it to show
133+ in the query stats viewer. Wait a little, and then refresh the page to see your
134+ query.
135+ </Highlight >
136+
92137## Query-level statistics with pg_stat_statements
93138
94139The ` pg_stat_statements ` extension gives you query-level statistics for your SQL
0 commit comments