Turn off autocommit mode

If your application runs in autocommit mode, then SQL Anywhere treats each of your statements as a separate transaction. In effect, it is equivalent to appending a COMMIT statement to the end of each of your statements.

Instead of running in autocommit mode, consider grouping your SQL statements so each group performs one logical task. If you disable autocommit, you must execute an explicit commit after each logical group of SQL statements. Also, be aware that if logical transactions are large, blocking and deadlock can happen.

If you are not using a transaction log file, the cost of using autocommit mode is high. Every statement forces a checkpoint—an operation that can involve writing numerous pages of information to disk.

Each application interface has its own way of setting autocommit behavior. For the Open Client, ODBC, and JDBC interfaces, Autocommit is the default behavior.

 See also