79613257

Date: 2025-05-08 22:38:46
Score: 1.5
Natty:
Report link

If performance is a concern you need to avoid the ORM as much as you can, if it's a repetitive operation to look up vendors Id based on the account number, you can write an insert/update trigger on the vendor to get the userId from the Accounts table.

To summarize you can apply this update SQL query once, then write a trigger on both insert and update actions on the vendor table to update it's userId.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: ayoub errazki