4 ms·
How did you minimize roundtrips between server and DB, or did you find that they were not a big concern? I'm working on a project with a Postgres database, and
by resu_nimda 6y ago
How did you minimize roundtrips between server and DB, or did you find that they were not a big concern?
I'm working on a project with a Postgres database, and as it gets more complex I'm moving more stuff into stored procedures, pretty much wherever a single action requires multiple statements in series (e.g. check if this thing exists, check a value, get the id of some other thing, on success update another table).
Of course I would prefer to leave as much of it in the middle tier as possible because the ergonomics are better there but I don't want to sacrifice performance.
- monocasa 6y agoI think they're saying that you profile your changes on an individual query. Yeah, if all of your queries are slow, you've got more work to do, but that doesn't change the overall process of optimization.