-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch insert behaviour with/without auto commmit? #2526
Comments
When autocommit is true:
When autocommit is false:
Summary: |
@divang : thanks - but I guess this is not always true, is it? Because it might depend on the URL Parameters like the bulkCopy feature. I guess even if autocommit is true, the bulk copy feature won't commit each single INSERT statement ... right? Does the bulk copy feature always commits all inserted rows at once with 1 single transaction? If not, the bulk copy feature wouldn't have any advantage if every single INSERT statement would be commited. Or am I missing a point? |
Batch inserts done using prepared statements with URL parameter The behavior mentioned above by @divang is consistent with |
Hi @JDBC-0, Please let us know if you have additional questions/comments, or else we will move forward with closing this issue. |
Question
How does the driver execute batch INSERTs if the connection auto commit is true?
The JDBC specification has no standard rule and this "is a driver specific" topic.
The documentation https://learn.microsoft.com/en-us/sql/connect/jdbc/performing-batch-operations?view=sql-server-ver16 has no hint for this - so how can we be sure that our batch inserts are performed as expected (as batches - and not as single INSERTs) - if auto commit is true?
The text was updated successfully, but these errors were encountered: