Questions tagged [auto-commit]
The auto-commit tag has no usage guidance.
20
questions
1
vote
1
answer
44
views
MySQL does not open a transaction, and initiates a request containing multiple SQLs.This time, is it a transaction, or is each SQL a transaction?
MySQL does not open a transaction, and initiates a request containing multiple SQLs. This time, is it a transaction, or is each SQL a transaction?
Does not open a transaction means that a transaction ...
0
votes
1
answer
766
views
disable autocommit in PostgreSQL 13 on Oracle Linux 8
I know this question has been asked before. I am new to PostgreSQL and would like to turn off "autocommit" forever. After some research, I need to add "\set AUTOCOMMIT off" in the ~...
0
votes
1
answer
66
views
What will happen if I run rollabck without begin in PostgresSQL statement?
I have run below statement without begin then, show a warning message
(WARNING: there is no transaction in progress)
like below image. But actually that table was deleted. Why it is not roll backed? ...
1
vote
1
answer
14k
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, ...
2
votes
1
answer
2k
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
1
answer
5k
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
1
answer
328
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
1
answer
467
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
0
answers
575
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
1
answer
1k
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
1
answer
728
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
0
answers
442
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
1
answer
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
1
answer
1k
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
1
answer
905
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
1
answer
354
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
1
answer
1k
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
0
answers
1k
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
4
answers
16k
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
1
answer
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[]...