Help Center > > Developer Guide> Data Import> Managing Concurrent Write Operations> Concurrent Data Import and Queries

Concurrent Data Import and Queries

Updated at:Mar 13, 2020 GMT+08:00

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 the same time, T2 is started. The COPY of T1 and then the SELECT of T2 starts, and both of them succeed. In this case, T2 cannot see the data added by the COPY of T1.

Scenario 2:

  • READ COMMITTED level

    T1 is started but not committed. At the same time, T2 is started. The COPY of T1 is complete and T1 is committed. In this case, T2 can see the data added by the COPY of T1.

  • REPEATABLE READ level

    T1 is started but not committed. At the same time, T2 is started. The COPY of T1 is complete and T1 is committed. In this case, T2 cannot see the data added by the COPY of T1.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel