Skip to content

Reduce D1 row reads for article pages - #45

Merged
sametbasbug merged 1 commit into
mainfrom
fix/d1-row-read-spike
Oct 6, 2026
Merged

sametbasbug merged 1 commit into
mainfrom
fix/d1-row-read-spike

Conversation

@sametbasbug

Copy link
Copy Markdown
Owner

What changed

  • split previous/next article lookup into index-friendly queries
  • replace correlated related-story scan with indexed tag candidates and in-app ranking
  • ignore pipeline metadata tags in related-story scoring
  • reject malformed article slugs early and cache versioned 404s

Validation

  • typecheck passed
  • static and SSR builds passed
  • 212 newsroom tests passed
  • Orbit test suites passed
  • 587/587 static-vs-D1 page parity
  • representative live D1 page path: 213 total rows_read vs 1,945 for the old related query alone

@sametbasbug
sametbasbug merged commit 701edf5 into main Oct 6, 2026
5 checks passed
@sametbasbug
sametbasbug deleted the fix/d1-row-read-spike branch October 6, 2026 05:00
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