←back to thread

570 points davidgu | 1 comments | | HN request time: 0.416s | 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. lelanthran ◴[] No.44526757[source]
> Yeah, I'm going to remove triggers in next deploy of a POS system since they are adding 10-50ms to each insert.

Do you expect it to be faster to do the trigger logic in the application? Wouldn't be slower to execute two statements from the application (even if they are in a transaction) than to rely on triggers?