---
title: "POST /GetQueryStatistics"
method: POST
path: "/GetQueryStatistics"
---

# POST /GetQueryStatistics

`POST /GetQueryStatistics`

Retrieves statistics on the planning and execution of a query.

## Request body

- object
  - `QueryId` string, required — The ID of the plan query operation.

## Response `200`

Success

- GetQueryStatisticsResponse
  - `ExecutionStatistics` object — An <code>ExecutionStatistics</code> structure containing execution statistics.
    - `AverageExecutionTimeMillis` integer — The average time the request took to be executed.
    - `DataScannedBytes` integer — The amount of data that was scanned in bytes.
    - `WorkUnitsExecutedCount` integer — The number of work units executed.
  - `PlanningStatistics` object — A <code>PlanningStatistics</code> structure containing query planning statistics.
    - `EstimatedDataToScanBytes` integer — An estimate of the data that was scanned in bytes.
    - `PlanningTimeMillis` integer — The time that it took to process the request.
    - `QueueTimeMillis` integer — The time the request was in queue to be processed.
    - `WorkUnitsGeneratedCount` integer — The number of work units generated.
  - `QuerySubmissionTime` string, date-time — The time that the query was submitted.

## Other responses

- `480` — StatisticsNotReadyYetException
- `481` — InternalServiceException
- `482` — InvalidInputException
- `483` — AccessDeniedException
- `484` — ExpiredException
- `485` — ThrottledException

---

[API](https://skmtc.net/aws/apis/lakeformation.md) · [All operations](https://skmtc.net/aws/apis/lakeformation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/lakeformation/versions/a7cd69eb107d/schema)
