Skip to content

Fix sponsor audience timeouts with a verified covering index - #171

Merged
filiksyos merged 2 commits into
mainfrom
fix/sponsor-audience-query
Oct 11, 2026
Merged

filiksyos merged 2 commits into
mainfrom
fix/sponsor-audience-query

Conversation

@filiksyos

@filiksyos filiksyos commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

The automatic visitor counter fell back to an owner snapshot because its database query exceeded the existing 8-second API limit.

The equivalent single-scan query and approved concurrent covering index are now installed. Public /sponsor shows '35K visitors last month' and 'Monthly traffic updates hourly'; Supabase REST logs confirm HTTP 200. September totals remain exactly 35,087. This PR records reproducible SQL, regression coverage and deployment evidence; it does not change frontend or access permissions.

Validation: 43 sponsor/library tests, TypeScript, targeted lint and diff check pass. Synthetic SQL checks pass; fixed-time comparison found zero differences across every aggregate field. Index is valid/ready (~9.8MB). Four actual service-role function runs stayed below the unchanged 8-second timeout: 7.491, 5.461, 3.497 and 1.718 seconds. Cold-cache margin remains limited because some recent pages require heap visibility checks; no timeout or maintenance settings were changed.

SECURITY INVOKER, fixed filters, service_role-only execution and anon/authenticated denial are unchanged. The index was created through standalone SQL because the migration wrapper cannot execute CREATE INDEX CONCURRENTLY. No raw data, credentials or unrelated library RPC changes.

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
gitreverse Ready Ready Preview Oct 11, 2026 5:48am UTC

Request Review

@filiksyos filiksyos changed the title Repair sponsor audience query timeouts with verified SQL Fix sponsor audience timeouts with a verified covering index Oct 11, 2026
@filiksyos
filiksyos marked this pull request as ready for review October 11, 2026 05:50

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@filiksyos
filiksyos merged commit 20864c6 into main Oct 11, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 9f5ad3b1 Deployed Oct 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant