Skip to content

SYSTEM Cited by 3 sources

PlanetScale Insights

What it is

Insights is a Postgres extension developed by PlanetScale and available exclusively on PlanetScale Postgres clusters. It provides per-query performance telemetry and hosts Traffic Control, the feature that enforces workload-class resource budgets on tagged queries.

Capabilities

  • Per-query performance telemetry — query duration, plan shape, resource consumption aggregated per statement for "find slow SQL" workflows.
  • Traffic Control — tag queries with SQLCommenter metadata (e.g. action=analytics) and apply Resource Budgets capping concurrent workers, server share, or per-query cost. See systems/planetscale-traffic-control.
  • AI-powered index suggestions — Insights periodically uses its own per-query-pattern telemetry (rows read, rows returned, runtime share, frequency) to pick candidate queries, feeds them to an LLM that proposes CREATE INDEX statements, and validates each candidate by running EXPLAIN with a hypothetical index via HypoPG. Only suggestions that materially reduce planner-estimated cost are surfaced. See concepts/llm-generated-database-changes, patterns/llm-plus-planner-validation, patterns/workload-aware-llm-prompting.

Why it exists

Upstream Postgres ships observability primitives (pg_stat_statements, pg_stat_user_tables) but no first-class mechanism for classifying queries by workload and enforcing class-level concurrency limits. Insights fills that gap with PlanetScale-specific extension code running inside the PlanetScale Postgres binary.

Seen in

  • sources/2026-04-11-planetscale-keeping-a-postgres-queue-healthy — Introduced as the vehicle that makes Traffic Control possible on PlanetScale Postgres. The article's concrete Traffic Control configuration (cap action=analytics to 1 worker, 25% of max_worker_processes) uses Insights' SQLCommenter tag recognition as the classification substrate.
  • sources/2026-04-16-cloudflare-deploy-postgres-and-mysql-databases-with-planetscale-workers — Called out as one of PlanetScale Postgres's headline differentiators on the Cloudflare partnership launch, alongside database branching and agent-driven SQL tooling.
  • sources/2026-04-21-planetscale-ai-powered-postgres-index-suggestions — Insights gains an AI-powered index suggestions surface. Rafer Hazen's launch post canonicalises Insights' per-query-pattern telemetry (rows-read vs rows-returned ratio, ≥ 0.1% aggregate runtime share, minimum frequency) as the input oracle that makes LLM-generated index suggestions useful — and HypoPG+EXPLAIN as the output oracle that makes them safe. Positions Insights' workload data as the structural moat: "to use the unique data and capabilities available in Insights to produce the best overall results."

Source

Last updated · 319 distilled / 1,201 read