2 ms·
Yeah, at such a load, it's almost always something like too many DB connections/queries. If you somehow use one DB connection per query and make multiple queri
by littlestymaar 3y ago
Yeah, at such a load, it's almost always something like too many DB connections/queries.
If you somehow use one DB connection per query and make multiple queries for every user, no wonder your website struggles under even a tiny bit of load.
- Kamq 3y agoThe number of times I've been bitten by an orm and the n+1 problem... Which, I guess is fine for some internal thing that needs to handle 8 requests a day. I've kinda stopped using orms at this point. The sql is usually clearer than whatever dsl has been shoved into the orm. If you ever change databases, it requires slightly more work (assuming you haven't gone too crazy with db specific functionality), but burning a day or two to update the sql in your project is usually still quicker than orchestrating the migration.