←back to thread

570 points davidgu | 2 comments | | HN request time: 0.489s | source
Show context
polote ◴[] No.44525307[source]
Rls and triggers dont scale either
replies(2): >>44525677 #>>44525805 #
shivasaxena ◴[] No.44525677[source]
Yeah, I'm going to remove triggers in next deploy of a POS system since they are adding 10-50ms to each insert.

Becomes a problem if you are inserting 40 items to order_items table.

replies(5): >>44525741 #>>44526565 #>>44526644 #>>44526757 #>>44526964 #
1. nine_k ◴[] No.44526964[source]
Hmm, imho, triggers do scale, they are just slow. But as you add more connections, partitionss, and CPUs, the slowness per operation remains constant.
replies(1): >>44530474 #
2. ants_a ◴[] No.44530474[source]
Triggers are not even particularly slow. They just hide the extra work that is being done and thus sometimes come back to bite programmers by adding a ton of work to statements that look like they should be quick.