3 ms·
tldr: Group your inserts ! "Together we are stronger" – Spartacus
by thesorrow 15y ago
tldr: Group your inserts ! "Together we are stronger" – Spartacus
- rkalla 15y agoA bit more than that: "Group, convert and collapse your DB commands!" insert 1, insert 2, insert 3 == insert [1,2,3] insert 1, delete 1 == [no-op] As the author pointed out you need to know a bit more about your domain to make this really efficient, for example: insert user1.dob, delete user2.dob = [2 discrete ops] while update user1.dob, delete user1.dob = [1 op - delete user1.dob] Cool idea; lots of opportunities for enhancement. The one thing you would have to look out for is effectively re-implementing a query optimizer inside of your application code and eating up too much CPU time on a busy system prepping calls. If you are not I/O bound, then this strategy isn't going to help you that much. If you are I/O bound, it is a great way to help get yourself out of that hole.
- deleted 15y ago[deleted]