Concurrent Data Import and Queries
Transaction T1:
1 2 3 |
START TRANSACTION; COPY test FROM '...'; COMMIT; |
Transaction T2:
1 2 3 |
START TRANSACTION; SELECT * FROM test; COMMIT; |
Scenario 1:
T1 is started but not committed. At this time, T2 is started. COPY of T1 and then SELECT of T2 starts, and both of them succeed. In this case, T2 cannot see the data added by COPY of T1.
Scenario 2:
- READ COMMITTED level
T1 is started but not committed. At this time, T2 is started. COPY of T1 is complete and T1 is committed. In this case, T2 can see the data added by COPY of T1.
- REPEATABLE READ level
T1 is started but not committed. At this time, T2 is started. COPY of T1 is complete and T1 is committed. In this case, T2 cannot see the data added by COPY of T1.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot