I have two threads that update table A at the same time. Each thread updates its own range of rows (they don't have intersections). Each thread works in READ UNCOMMITTED
transaction. There is an AFTER UPDATE
trigger on table A which adds records to the table B. Table B has BIGINT
primary key. In which order the records on the table B will be added? Is it possible that the records generated by the first transaction will be mixed with records generated by the second transaction or it's always one transaction writes it's data and the second writes only after that?
I mean is it possible that when the first transaction is completed I'll have rows in table B with PK values 3,6,8,9 and when the second transaction is completed there will be added PK values 4,5,7,10? Or the range of PK values generated by the first transaction won't be mixed with values generated by the second one? Transaction that reads from table B is READ COMMITTED