Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Moving data between tables doesn't require sending it to the client and back. A query like insert into A select * from B requires minimal network traffic but may copy GB of data. Commented Dec 6, 2022 at 23:02
  • You find nothing about "network performance" with triggers, because you are mixing up stored procedures with triggers. Of course, these two things are connected, since triggers require stored procedures, but but reducing network performance isn't a cause of using a trigger, it is cause of using a stored procedure. Commented Dec 7, 2022 at 6:37
  • ... so in your use case above, first thing you need to clarify is if the JSON record needs to be moved immediately, inside the very same transaction, to the new table when the status field changes, and if you expect different applications to change the status field. If yes, using a trigger would be the logical choice, regardless if there is just one number to move or 2KB of data. Commented Dec 7, 2022 at 6:41
  • ... so I recommend you google terms like "stored procedures vs client code", that gives a lot of results. Commented Dec 7, 2022 at 6:47