Home > database >  The trigger efficiency problem
The trigger efficiency problem

Time:09-22

The trigger before A update
According to A table changes to update the B table which of the following solutions with high efficiency, minimal effect on the server
A. When A change 1. According to the first query table B meet the conditions have not Update the records (2) have to perform the Update table statements B
Ii. 1. When A change directly update the B table according to the condition that is likely to update 0,

CodePudding user response:

This problem is quite good, I feel quick UPDATE efficiency directly, but directly UPDATE will bring risk problem, for example, if there are 2 records, at the same time should be updated?

CodePudding user response:

Of course choose 2, 1 floor concerns much
1 and 2 would you say is true, has nothing to do with your discussion

CodePudding user response:

Of course to choose 2, 1 is one many times
  • Related