Skip to content

Optimize queries with slim hydration and denormalized tag counts#8

Merged
gavyncaldwell merged 5 commits intomainfrom
fix/buffer-cached-responses
Mar 13, 2026
Merged

Optimize queries with slim hydration and denormalized tag counts#8
gavyncaldwell merged 5 commits intomainfrom
fix/buffer-cached-responses

Conversation

@gavyncaldwell
Copy link
Collaborator

Summary

  • Add denormalized appCount column to tags table, computed during seed import — eliminates 25k+ row JOIN scans for tag count queries
  • Introduce slim list query helper that loads only card-relevant columns (id, name, slug, description, iconUrl) and platform tags instead of full app hydration
  • Convert all 6 list queries (listApps, listAppsByTag, listAppsByLicense, listDesktopApps, getRecentApps, searchApps) to use slim hydration

Test plan

  • Schema change pushed, seed import populates 59 tags with counts
  • TypeScript typecheck passes
  • Biome lint passes
  • Deployed to Cloudflare Workers
  • /apps and /apps/signal return 200

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
unclouded 47170d0 Commit Preview URL

Branch Preview URL
Mar 13 2026, 06:19 PM

@gavyncaldwell gavyncaldwell merged commit e2aa496 into main Mar 13, 2026
2 checks passed
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