B table fields: address (text)
Client submit data have 2 kinds of stored procedures,
A: is it to A new data table, and then check whether these new data already exists in table B, if any, marking;
Two: is new data to the table B, then check whether these new data already exist on A table, if you have, marking;
Program is currently single thread, the first kind of behavior, and the second kind of behavior does not occur at the same time, if to multithreading submitted at the same time, because it is a time-consuming operation, the data will be disorder, such as:
Execute the stored procedure at 9:00, 9:06 is expected to complete,
In that the execution of the stored procedure two, it is expected to complete, than the stored procedure is a late start, but early end,
Is that will be in the process to table A new data due to the execution process of two haven't finished writing, hasn't been process two than to?
Record the result leads to actually exist in table A, but I don't have to make A mark?
CodePudding user response:
You can wrap up two stored procedures in a new stored procedure execution
CodePudding user response: