title: In which condition "Creating tmp table" and "removing tmp table" State last for long in MySQL?
body: <p>I have lot of queries that shows their state <strong>Creating tmp table</strong> or <strong>removing tmp table</strong>.</p>
  
  <p>My Queries are already optimized, when i run query separately it executes in less than 1 second but sometimes lot of queries stuck in this state for around 1 minute.</p>
  
  <p>Whats the situation for this would happen ? And is there any variable that tune this kind of situation ?</p>