I wrote last week about three painful queries that I needed to futz with: exporting all email events, aggregating client statistics, and time-series aggregations.
This slightly more methodical approach worked pretty well! To start with the good stuff:
- Exporting email events for a big newsletter now takes O(seconds-to-minutes) instead of O(minutes-to-hours). This in of itself was the single most urgent thing: I can stomach analytics not working for certain newsletters, but the idea of someone not being able to get their data out of Buttondown was anathema.
- Client-level aggregations are now live and the "inbox statistics pane" loads quite fast. This is one of those lovely performance changes that actually have product-level implications, too — it's now feasible for me to pull out specific clients used by a subscriber and display them live in the subscriber detail page, whereas previously that would have been a pretty expensive call.
Time-series aggregation is still...pretty painful. If you're a newsletter with, say, twenty thousand subscribers and a year's worth of emails on Buttondown, I'm no longer timing out when you try and get your analytics for the past quarter (yay!) but I'm definitely still timing out when you try to get your analytics for the past year (boo!)