<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="tracing-memory-usage">
      </a>
      10.15.5 Tracing Memory Usage
     </h3>
    </div>
   </div>
  </div>
  <p>
   Each stored trace is a string, which is extended (using
   <code class="literal">
    realloc()
   </code>
   ) as optimization progresses by
      appending more data to it. The
   <a class="link" href="server-system-variables.html#sysvar_optimizer_trace_max_mem_size">
    <code class="literal">
     optimizer_trace_max_mem_size
    </code>
   </a>
   server system variable sets a limit on the total amount of memory
      used by all traces currently being stored. If this limit is
      reached, the current trace is not extended, which means the trace
      is incomplete; in this case the
   <code class="literal">
    MISSING_BYTES_BEYOND_MAX_MEM_SIZE
   </code>
   column shows
      the number of bytes missing from the trace.
  </p>
 </div>
 <br/>
</div>
