Retrieve a summary of query statistics
Authorization
A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
Service Token Accesses
read_databases, read_database
OAuth Scopes
| Resource | Scopes |
|---|---|
| Organization | read_databases |
| Database | read_database |
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Organization name slug from list_organizations. Example: acme.
Database name slug from list_databases. Example: app-db.
Branch name from list_branches. Example: main.
The query fingerprint
Query Parameters
The keyspace to filter by
Start time for filtering query statistics (ISO 8601 timestamp)
End time for filtering query statistics (ISO 8601 timestamp)
Time period for filtering query statistics (e.g., '1h', '24h')
Response
Returns aggregated query statistics summary
The ID of the query summary
The query fingerprint
The type of SQL statement
The keyspace the query ran against
The normalized SQL statement
Syntax highlighted SQL statement
Whether the query is a multishard query
The number of times this query was executed
The number of times this query resulted in an error
Tables accessed by the query
Fully qualified tables accessed by the query
Mapping of tables to their keyspaces
Index usage information
Routing index usage information
The total number of shard queries
The maximum number of shard queries for a single execution
The average number of shard queries
The total number of rows read
The total number of rows affected
The total number of rows returned
Average rows read per row returned
Average rows read per query
Average rows returned per query
Average rows affected per query
Total duration in milliseconds across all executions
Percentage of total query time
Total CPU duration in milliseconds
Percentage of total CPU time
Total IO duration in milliseconds
Percentage of total IO time
When this query was last executed
Average time per query execution
50th percentile latency
99th percentile latency
Maximum latency observed
Total egress bytes
Average egress bytes per query
Maximum egress bytes for a single execution
Total ingress bytes
Average ingress bytes per query
Maximum ingress bytes for a single execution
Total blocks read from disk
Total blocks found in cache
Cache hit ratio for blocks
Total blocks dirtied
Total blocks written
The number of executions that triggered a traffic control warning
The number of executions throttled by traffic control
The number of executions checked by traffic control rules

