Re:Things I wished more developers knew about databases
by resu_nimda on Wednesday April 22, 2020 @01:37PM
(#22948094)
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.
Re:Things I wished more developers knew about databases
by monocasa on Wednesday April 22, 2020 @01:57PM
(#22948324)
I 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.
Of course the database vendor and culture also plays a role. We were primarily a mysql/postgresql shop