Silent 5,000-row API cap caused dashboard to silently misreport search rank data
A developer discovered that an internal search-rank dashboard was silently displaying incorrect data due to a hard 5,000-row cap in a generic query endpoint, while the actual table contained 9,104 rows. The API returned a normal 200 response with no truncation warning, causing 4,104 rows to be dropped without any visible error. Because rank-change calculations depended on comparing two full time windows of data, the missing rows caused the dashboard to render dashes instead of meaningful changes. The fix involved shifting data aggregation to SQL using Postgres DISTINCT ON, returning one row per keyword rather than raw daily rows, keeping response size bounded by keyword count. The developer outlined key lessons: silent caps are silent lie generators, LIMIT without ORDER BY is nondeterministic sampling, and missing values must never render identically to zero-change values.
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