feoblog icon indicating copy to clipboard operation
feoblog copied to clipboard

Improve user feed query

Open NfNitLoop opened this issue 4 years ago • 2 comments

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?)

NfNitLoop avatar Jan 09 '22 20:01 NfNitLoop

Implemented this in 036b04555e317b361e80883c6f7a85d249bbd6ef

NfNitLoop avatar Jan 29 '22 20:01 NfNitLoop

I'll close this when this feature makes it into the next release.

NfNitLoop avatar Mar 19 '22 16:03 NfNitLoop