R-a-dio / valkyrie

R/a/dio software stack
https://r-a-d.io
MIT License
5 stars 3 forks source link

storage/mariadb: pagination shouldn't use LIMIT OFFSET #125

Closed Wessie closed 5 months ago

Wessie commented 6 months ago

this seems to have been caused by unoptimized database data, running optimize table on the database seemed to have fixed these

Wessie commented 6 months ago

or not, some queries are still painfully slow

Wessie commented 6 months ago

The only way to solve this is by switching to a last id system instead of using LIMIT ? OFFSET ? which is just inherently slow, the same goes for favorites and other paginated things