メインコンテンツへスキップ
GET
List Postgres slow query patterns
Returns aggregate metrics for the slowest query patterns observed on a Postgres service during the given time window. Use this to discover which queries dominate total execution time, CPU, I/O, or WAL generation.

Permission

The API key must have the control-plane:postgres-service:view permission.

承認

Authorization
string
header
必須

Use key ID and key secret obtained in ClickHouse Cloud console: https://clickhouse.com/docs/cloud/manage/openapi

パスパラメータ

organizationId
string<uuid>
必須

ID of the organization that owns the Postgres service.

postgresId
string<uuid>
必須

ID of the requested Postgres service.

クエリパラメータ

from_date
string<date-time>
必須

Inclusive start of the time window (RFC 3339 date-time).

to_date
string<date-time>
必須

Exclusive end of the time window (RFC 3339 date-time).

db_name
string

Database name filter.

db_user
string

Database user filter.

db_operation
string

Database operation filter (for example, SELECT, INSERT, UPDATE, DELETE, UTILITY).

app
string

Application name filter.

sort_by
enum<string>
デフォルト:total_duration

Field to sort results by.

利用可能なオプション:
total_duration,
avg_duration,
call_count,
total_blks_read,
total_cpu_time,
error_count,
max_duration,
p50_duration,
p95_duration,
p99_duration,
total_rows,
total_shared_blks_hit,
total_wal_bytes
sort_order
enum<string>
デフォルト:desc

Sort order. One of asc or desc.

利用可能なオプション:
asc,
desc
limit
integer
デフォルト:20

Maximum number of results to return.

必須範囲: 1 <= x <= 500
offset
integer
デフォルト:0

Number of results to skip before returning.

必須範囲: x >= 0

レスポンス

Successful response

status
number

HTTP status code.

例:

200

requestId
string<uuid>

Unique id assigned to every request. UUIDv4

result
object[]