search

Home  >  Q&A  >  body text

mysql - 执行大量SQL进行批量插入或更新,开启事务执行会提高执行速度还是降低执行速度?

大家讲道理大家讲道理2785 days ago972

reply all(1)I'll reply

  • 阿神

    阿神2017-04-17 15:44:32

    Regardless of the size of the transaction, committing is a very fast operation. It is not that the larger the transaction (in other words, the more data is affected), the longer it takes to commit. If you only do it once when necessary Submit (when transaction processing is completed), then users can not only improve performance, but also reduce contention for shared resources (log files, locks protecting sga class shared data structures).
    --Excerpted from <oracle entry classic >

    reply
    0
  • Cancelreply