title: Difference between set autocommit=0 and set session transaction isolation level REPEATABLE READ;start transaction;?
body: <p>It is mentioned <a href="https://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-model.html" rel="nofollow">here</a> that default isolation level for any transaction in innodb is repeatable read.
  In the same link above it is also mention that if I do set autocommit=0 then session always have transaction open.
  Now My undersatnding is if I do</p>
  
  <pre><code>set session transaction isolation level REPEATABLE READ;
  
  start transaction;
  
  DML(insert, update, delete) queries
  
  commit;
  </code></pre>
  
  <p>and </p>
  
  <pre><code> set autocommit=0;
  
      DML(insert, update, delete) queries
  
      commit;
  </code></pre>
  
  <p>Both should do the same, should run in repeatable read isolation level. I need to do commit or rollback in the end.</p>
  
  <p>But as I use them for lot of queries the first one take lot of time and second one takes very little time. So clearly they aren't same. What I am missing? what is the default isolation level of transaction while auto commit is set to 0? Thanks in advance.</p>
  
  <p>EDIT:I got the answer of what is default isolation level if I do set autocommit=0;(Thanks to kostja) It can be seen from <strong>show variables like "%isolation";</strong> But I am yet to find out why first one is slower.</p>