title: Creating indexes concurrently in MySQL
body: <p>I found a procedure in pl/sql that creates indexes with <strong>multiple threads</strong>:</p>
  
  <pre><code>declare l_job number;
  begin
      dbms_job.submit( l_job, 'execute immediate ''alter index idx1 rebuild'';' );
      commit;
      dbms_job.submit( l_job, 'execute immediate ''alter index idx2 rebuild'';' );
      commit;
  end;
  </code></pre>
  
  <p>This procedure will be executed in parallel. </p>
  
  <p>Can I write such procedure in MySQL?  Can MySQL execute a procedure in a separate thread?</p>