Replying to
@b0rk@social.jvns.ca
@b0rk@social.jvns.ca yeah as other people have mentioned, it isn't usually one bad query that's the problem, it's lots of little ones caused by the ORM (the n+1 issue, or even worse when it's 1+n*m). With sqlite many small queries are still fast and you can get away with a lot of things that would be a major problem with a separate database server, especially if the network is involved.