Should I commit or rollback a read transaction?

后端 未结 12 1062
臣服心动
臣服心动 2020-12-02 10:42

I have a read query that I execute within a transaction so that I can specify the isolation level. Once the query is complete, what should I do?

  • Commit the tr
12条回答
  •  有刺的猬
    2020-12-02 11:21

    If you set AutoCommit false, then YES.

    In an experiment with JDBC(Postgresql driver), I found that if select query breaks(because of timeout), then you can not initiate new select query unless you rollback.

提交回复
热议问题