Fill-rate SQL queries catch dead code that grep and unit tests miss
A software engineer writing for DEV Community found that simple SQL fill-rate queries — counting how many rows have a given column populated — reliably expose dormant logic that neither grep searches nor unit tests can detect. Across seven projects, the approach uncovered multiple silent failures, including a coordination database where only 7 of 177 rows had a critical consistency column filled, leaving three downstream gate constants effectively evaluating against empty data. A separate query revealed that 95 out of 101 routed queries never had their results fed back to the caller. One seven-row stats table showed win-rate data updating normally while run counters had never incremented since inception, keeping a demotion threshold permanently unreachable. The author argues that grep matches the shape of bugs you already expect, while column-level data queries surface failures that no one has yet thought to look for.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in