[Metrics] Speed up new activity query#2763
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesDaily Activity Metrics Backfill
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I gave Claude the output of
EXPLAINon the current query and it identified that finding the earliest tx date for an app was the most expensive part (huge scan)Instead we can do two things:
We'll still get all new transactions and look at a lot less data. Tested this for todays job and the query time wen from 6.5 min -> ~50 seconds