Skip to content

query_plan_dim is 63% of the Darling store and never shrinks — and query_store_stats compresses at 2.7x against siblings' 10-30x #2316

Description

@erikdarlingdata

Split out of #2295, which fixed the growth mechanism (retention armed 17/17, #2150 text flip). What remains is the store's standing composition, measured on the use2 box (42-server fleet, store 196 GB on 2026-08-17):

Finding 1: query_plan_dim, 121 GB, 63% of the store

query_plan_dim is a plain dimension table, not a hypertable — so it sits outside both the compression policies and the retention horizons that now govern everything else. Plan XML accumulates forever, uncompressed beyond default TOAST pglz. The top-8 hypertables together are ~42 GB; this one table is ~3x all of them combined.

Levers worth costing, separately or together:

Finding 2: query_store_stats compresses 2.7x; its siblings do 10-30x

The biggest hypertable (24 GB) gets the worst compression ratio in the store by an order of magnitude. Suspects: segmentby/orderby misfit for its write pattern (wide rows, per-interval snapshots, high-cardinality query_id), or the dedup-read-side design (rn=1 over repeated open-interval snapshots) storing near-duplicate rows the compressor can't fold because segment boundaries split them. Note #2312/#2314 just cut open-interval re-snapshots by ~two thirds, which shrinks the inflow of near-duplicates — re-measure the ratio after a week of the new write pattern before touching compression settings.

Non-goal

Growth-rate emergency response — that was #2295's job and it's done (~2.8 GB/day at last measure, ~90-day runway, horizons armed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions