title: MySQL temporary vs memory table in stored procedures
body: <p>What's is better to use in a stored procedure:  a temporary table or a memory table?</p>
  
  <p>The table is used to stored summary data for reports.</p>
  
  <p>Are there any trade offs that developers should be aware off?</p>
  
  <pre><code>CREATE TEMPORARY TABLE t (avg (double));
  </code></pre>
  
  <p>or</p>
  
  <pre><code>CREATE TABLE t (avg (double)) ENGINE=MEMORY;
  </code></pre>