Skip to main content
Layer: Physical schema
Returns SQL statements that have actually been observed running against a table, sourced from pg_stat_statements. Each example carries an observation count, a sensitivity tag, and a sorted PII category list. Run schemabrain mine-queries --url-env DATABASE_URL --store-path ./schemabrain.db once (or on a schedule) to populate the example-queries cache from pg_stat_statements. Until then, this tool returns status: empty with a recovery hint.
Pass qualified_name as schema.name — same shape as describe_table. Tables with no observed queries (or before mine-queries has run) return an empty result with a follow-up hint.