title: time complexity to get auto incremented row id in mysql
body: <p>I am a newbie at mysql and databases.
  I have a simple question. I have created a table that has an integer type id column that is auto incremented. After each insert I get the last row inserted id (in python using cursor.lastrowid, or connection.insert_id()). I wanted to know what is the time complexity in mysql to get this value?
  I am guessing its O(1) as the database should be storing this value somewhere and updating it after each insert?</p>
  
  <p>Thanks.</p>