Questions tagged [auto-commit]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
130 views

How to turn off "autocommit" in PostgreSQL

I am working with PostgreSQL version 11, and would like to turn of autocommit. Either permanently or per query through a pl/pgsql command. In the documentation it says it is turned off by default, ...
1
vote
1answer
311 views

What is isolation level of autocommit?

I'm trying to make sense from "autocommit" concept. Originally I've heart about it in the context of Java JDBC API Connection.setAutoCommit(boolean autoCommit) Quick search revealed that the ...
0
votes
1answer
2k views

MySQL Difference between BEGIN and START TRANSACTION

I'm using RDS Aurora (MySQL 5.6) By default Auto Commit flag is enabled. I have a transaction as follows BEGIN; INSERT INTO .....;// STATEMENT 1 INSERT INTO ......;//STATEMENT 2 COMMIT; I'm ...
0
votes
1answer
145 views

Will Postgresql statements execute synchronously if autocommit=true?

If a single application thread sends a series of INSERT statements and autocommit=true, will the statements be executed synchronously on the server? I read that on the postgres server side, "there ...
1
vote
1answer
261 views

Queries logged in the 'Slow query log', and 'start transaction' vs 'set autocommit = 0'

Currently long_query_time is set to 5, and that works. However, many queries are part of a transaction, and the slow query log only keeps the final commit;. # Time: 2018-08-15T15:18:18.205309Z # ...
1
vote
0answers
433 views

Mysql Deadlock in Stored Procedure,composite unique key

I have a table with composite unique key(uniqueness on combination of 3 columns.) Table structure: CREATE TABLE `userreview` ( `cid` bigint(12) unsigned NOT NULL, `conid` bigint(12) unsigned NOT ...
2
votes
1answer
971 views

Auto-commit UPDATE Transaction On Linked Server

I would like to know more about what happens behind the scenes with an auto-commit transaction when performing a cross-server query on a linked server. I naïvely think that when executing an auto-...
0
votes
1answer
146 views

What if a connection closes in the middle of a commit?

I have a few large CSV files to upload to an instance of SQL Server.(Nope, can't use SSMS) I'm using JDBC to read the CSVs line by line and insert the lines in a table in batches. Supposing my code is ...
0
votes
0answers
187 views

How to know if a DB transaction is successfully committed in case of timeout?

Out of curiosity: For example, I issue commit at the end of a transaction and wait for the response from the database. If for some reason, the waiting times out, how can I know if this transaction ...
3
votes
1answer
3k views

relationship between transaction chaining and autocommit

I am trying to understand the relationship between the concepts of transaction chaining and autocommit. Autocommit is usually exposed in a client-side programmatic interface. E.g. in JDBC with the ...
-1
votes
1answer
532 views

Autocommit disabled on mysql restart

I have a database that already have a lot of changes for weeks and the autocommit has been disabled. Today we restarted mysql service, will those changes be rollbacked? We haven't executed COMMIT for ...
2
votes
1answer
611 views

Insert but Don't Commit MySql

I am pretty new to MySql and Databases, and I was wondering in python sometimes I forgot to commit after an insert, and then when I do then next insert and commit that one the, auto-incrementing id ...
-1
votes
1answer
283 views

Is my import still committing?

I'm importing around 9 million rows into my MySQL DB using the following command: SET autocommit=0; SOURCE my_import.sql; COMMIT; The command line is no longer outputting lines of Query OK, X rows ...
2
votes
1answer
875 views

Does READ UNCOMMITTED have the same effect as AUTOCOMMIT=1?

AFAIK running transactions as READ UNCOMMITTED means that there is no lock, so every change caused by a transaction is immediately visible to other transactions. Is it correct to assume that this is ...
2
votes
0answers
780 views

Is there a way to detect if there is an uncommitted transaction in H2?

I am using an H2 database with JDBC to create a connection with setAutoCommit(false). I am currently programatically checking whether or not there is an uncommitted transaction, but I was wondering ...
5
votes
4answers
15k views

Is it better to use AUTOCOMMIT = 0

Is it better to use (for perfomance tuning) AUTOCOMMIT = 0 before bulk inserts of data in MySQL, if the insert query looks like INSERT INTO SomeTable (column1, column2) VALUES (val1,val2),(val3,val4)...
2
votes
1answer
3k views

jdbc: does setAutoCommit(true) commits past executions?

I would like to execute some statements, and commit the entire batch at the end. I've tried the following approach: connection.setAutoCommit(false); // Don't commit for each statement int[]...