Execution Plan Differences When Autocommit is Off or Displaying Transactions

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: autocommit 不同时或显示事务 执行计划显示不一样

| username: h5n1

When autocommit=0 or a transaction is explicitly started with begin, the execution plan shown by explain analyze is inconsistent.
When autocommit=1, the execution info displays execution statistics from TiKV.

When autocommit=0 or in explicit transactions, the execution info only shows the time.

| username: yilong | Original post link

Yes, if you feel that the information displayed about TiKV in transactions is insufficient, you can raise a GitHub issue. However, generally, it seems that displaying transactions might not involve looking at analyze.

| username: h5n1 | Original post link

I think the same command for explain should yield the same result regardless of explicit or implicit transactions.