Re:The Performance Cost of Node.js and GraphQL
by bastawhiz on Monday October 09, 2023 @01:48PM
(#37823132)
I'd normally agree, but this is dangerous advice. Why? Because by the time you notice, it's not slow, it's down. N+1 queries don't scale badly as a function of users, it scales badly as a function of cumulative user behavior. One unexpectedly active user can make you self-DoS your database. Even a DB proxy like pgbouncer won't really help because parameterized queries are likely implemented with stored procedures, which require an exclusive DB connection, layering bottlenecks on bottlenecks.
[ Parent
| on HN ]
Re:The Performance Cost of Node.js and GraphQL
by SkyPuncher on Monday October 09, 2023 @02:34PM
(#37823620)
In my experience, you typically don’t just improve past slwo with n+1s.
Sure, if you introduce an n+1 to a large, existing table it will slow down. However, most endpoints are going to start at zero.