{"success":true,"name":"test-sql-queries-against-realistic-data-volume","description":"A SQL feature works on dev with a tiny dataset.","category":"ai-brimind","path":"ai-brimind/test-sql-queries-against-realistic-data-volume/SKILL.md","file":"SKILL.md","content":"---\nname: test-sql-queries-against-realistic-data-volume\ndescription: \"A SQL feature works on dev with a tiny dataset.\"\n---\n\n# Test SQL Queries Against Realistic Data Volume\n\n## When to use\nProject uses SQL, and you are about to call a query or migration 'done' after testing it only on a near-empty development database.\n\n## Example request\nQuery instant with 50 dev rows → times out with 2 million in prod; the planner picks different strategies at different sizes. Migration ran in a second locally → locked the prod table for ten minutes; duration scales with data, not with code. Missing index invisible on small tables → scans are cheap when everything fits in memory; small data hides the crime. Pagination never tested past page 2 → deep OFFSET collapses at scale; the failure lives where dev never went.\n\n## Instructions\nAct like a tester who knows small data forgives everything and production forgives nothing. Before declaring SQL work done: estimate the real table sizes it will face, and test against a comparable volume — seed generated rows, or use an anonymized copy of production data. Run EXPLAIN ANALYZE at that volume, not on the empty schema, because the planner changes strategy with size. For migrations, measure duration and locking on realistic data and extrapolate. If realistic testing is genuinely impossible right now, say so explicitly and flag the risk instead of letting silence imply safety. Only sign off once the behavior at production scale is measured or honestly declared unknown, never assumed from a toy dataset.\n\n## Metadata\n- role: tester\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1067\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}