The current query just walks down the items table by timestamp, filtering for follow matches.
It seems to perform slowly, though, taking up to 400ms on my DigitalOcean server. Maybe SQLite isn't optimizing it like I thought.
The best way to scale may be to pull the list of follows, then walk each individually and merge them in the server. (Unless I can accomplish something like that with SQLite's recursive queries?)
The current query just walks down the items table by timestamp, filtering for follow matches.
It seems to perform slowly, though, taking up to 400ms on my DigitalOcean server. Maybe SQLite isn't optimizing it like I thought.
The best way to scale may be to pull the list of follows, then walk each individually and merge them in the server. (Unless I can accomplish something like that with SQLite's recursive queries?)