---
title: "Fetch PostgreSQL service query statistics (DEPRECATED: Use /project/$project/service/$service/pg/query/stats instead)"
method: POST
path: "/project/{project}/service/{service_name}/query/stats"
tags: ["Service:_PostgreSQL"]
deprecated: true
---

# Fetch PostgreSQL service query statistics (DEPRECATED: Use /project/$project/service/$service/pg/query/stats instead)

`POST /project/{project}/service/{service_name}/query/stats`

> **Deprecated.**

The API endpoint /v1/project/{project}/service/{service\_name}/query/stats is deprecated and will be removed on 2026-03-11.

## Path parameters

- `project` string, required
- `service_name` string, required

## Response `200`

Response

- PGServiceQueryStatisticsDeprecatedResponse — PGServiceQueryStatisticsDeprecatedResponse
  - `errors` object[] — List of errors occurred during request processing
    - `message` string, required — Printable error message
    - `more_info` string — URL to the documentation of the error
    - `status` integer, required — HTTP error status code
  - `message` string — Printable result of the request
  - `queries` object[], required — List of query statistics
    - `blk_read_time` number — Query statistic
    - `blk_write_time` number — Query statistic
    - `calls` number — Query statistic
    - `database_name` string — Query statistic
    - `local_blks_dirtied` number — Query statistic
    - `local_blks_hit` number — Query statistic
    - `local_blks_read` number — Query statistic
    - `local_blks_written` number — Query statistic
    - `max_plan_time` number — Query statistic
    - `max_time` number — Query statistic
    - `mean_plan_time` number — Query statistic
    - `mean_time` number — Query statistic
    - `min_plan_time` number — Query statistic
    - `min_time` number — Query statistic
    - `query` string — Query statistic
    - `queryid` number — Query statistic
    - `rows` number — Query statistic
    - `shared_blks_dirtied` number — Query statistic
    - `shared_blks_hit` number — Query statistic
    - `shared_blks_read` number — Query statistic
    - `shared_blks_written` number — Query statistic
    - `stddev_plan_time` number — Query statistic
    - `stddev_time` number — Query statistic
    - `temp_blks_read` number — Query statistic
    - `temp_blks_written` number — Query statistic
    - `total_plan_time` number — Query statistic
    - `total_time` number — Query statistic
    - `user_name` string — Query statistic
    - `wal_bytes` string — Query statistic
    - `wal_fpi` number — Query statistic
    - `wal_records` number — Query statistic

---

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