Setting the file. One moment.
Chapter 08 · Clickhouse Managed Postgres Rca
Subchapter 8.8
rules/output-template.mdMarkdown3 KBView on GitHub
Every RCA response uses this structure. Do not deviate.
## Symptom
<one or two sentences on what the Prometheus signal showed,
naming the specific metrics and the rate-of-change or value
that flagged the issue>
## Evidence
The dominant slow query pattern(s) from
`slowQueryPatternsGetList`:
```json
<the actual JSON object(s), trimmed to the fields that matter
for the heuristic you applied — typically call_count,
total_duration, avg_duration, total_rows, blocks_read_from_disk,
blocks_served_from_cache, query_text. Use the resolved actual
field names from your session's role map, not the role labels.>
```
Key derived values (if applicable to the heuristic):
- `blks_touched_per_row` = <number>
- `call_count` over the window = <number>
- derived cache hit ratio = <number>
## Hypothesis
<the heuristic you matched (e.g., full scan, hot loop, write
congestion) and the most likely underlying cause. If the
heuristic cannot distinguish between two causes from this
surface alone, state both and explain what would
distinguish them.>
## Recommended action
<the concrete fix. For an index recommendation:>
```sql
CREATE INDEX CONCURRENTLY <descriptive_name>
ON <table> (<cols>) [WHERE <predicate>];
```
<For an application-side fix: a specific code/query change to
make, e.g. "batch the loop into a single SELECT with
`WHERE id = ANY($1)`".>
<For a configuration/operational concern: the specific check
or follow-up the user should run, e.g. "check Postgres logs
for `deadlock detected` entries to see the conflicting
statements".>
One sentence on why this action addresses the diagnosed cause.
## Long-term follow-ups
- <bullet — e.g., audit other unindexed filterable columns on
the same table>
- <bullet — e.g., add a CI check that flags new ORM-generated
per-row queries>
## What I did NOT do
- I did not run any DDL.
- I did not cancel or kill any queries.
- I did not modify any application code or configuration.
- A human should review the recommendation above and apply it.CREATE INDEX CONCURRENTLY — never block writes on a running instance.