query_runtime_statistics
Creates, updates, deletes, gets or lists a query_runtime_statistics resource.
Overview
| Name | query_runtime_statistics |
| Type | Resource |
| Id | aws.athena.query_runtime_statistics |
Fields
The following fields are returned by SELECT queries:
- get_query_runtime_statistics
| Name | Datatype | Description |
|---|---|---|
output_stage | object | Stage statistics such as input and output rows and bytes, execution time, and stage state. This information also includes substages and the query stage plan. |
rows | object | Statistics such as input rows and bytes read by the query, rows and bytes output by the query, and the number of rows written by the query. |
timeline | object | Timeline statistics such as query queue time, planning time, execution time, service processing time, and total execution time. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_query_runtime_statistics | select | region | Returns query execution runtime statistics related to a single execution of a query if you have access to the workgroup in which the query ran. Statistics from the Timeline section of the response object are available as soon as QueryExecutionStatus$State is in a SUCCEEDED or FAILED state. The remaining non-timeline statistics in the response (like stage-level input and output row count and data size) are updated asynchronously and may not be available immediately after a query completes or, in some cases, may not be returned. The non-timeline statistics are also not included when a query has row-level filters defined in Lake Formation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_query_runtime_statistics
Returns query execution runtime statistics related to a single execution of a query if you have access to the workgroup in which the query ran. Statistics from the Timeline section of the response object are available as soon as QueryExecutionStatus$State is in a SUCCEEDED or FAILED state. The remaining non-timeline statistics in the response (like stage-level input and output row count and data size) are updated asynchronously and may not be available immediately after a query completes or, in some cases, may not be returned. The non-timeline statistics are also not included when a query has row-level filters defined in Lake Formation.
SELECT
output_stage,
rows,
timeline
FROM aws.athena.query_runtime_statistics
WHERE region = '{{ region }}' -- required
;