<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-events-stages-history-long-table">
      </a>
      29.12.5.3 The events_stages_history_long Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045072973616">
  </a>
  <a class="indexterm" name="idm46045072972112">
  </a>
  <p>
   The
   <a class="link" href="performance-schema-events-stages-history-long-table.html" title="29.12.5.3 The events_stages_history_long Table">
    <code class="literal">
     events_stages_history_long
    </code>
   </a>
   table contains the
   <em class="replaceable">
    <code>
     N
    </code>
   </em>
   most recent
          stage events that have ended globally, across all threads.
          Stage events are not added to the table until they have ended.
          When the table becomes full, the oldest row is discarded when
          a new row is added, regardless of which thread generated
          either row.
  </p>
  <p>
   The Performance Schema autosizes the value of
   <em class="replaceable">
    <code>
     N
    </code>
   </em>
   during server startup. To set the
          table size explicitly, set the
   <a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_stages_history_long_size">
    <code class="literal">
     performance_schema_events_stages_history_long_size
    </code>
   </a>
   system variable at server startup.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-events-stages-history-long-table.html" title="29.12.5.3 The events_stages_history_long Table">
    <code class="literal">
     events_stages_history_long
    </code>
   </a>
   table has the same columns as
   <a class="link" href="performance-schema-events-stages-current-table.html" title="29.12.5.1 The events_stages_current Table">
    <code class="literal">
     events_stages_current
    </code>
   </a>
   . See
   <a class="xref" href="performance-schema-events-stages-current-table.html" title="29.12.5.1 The events_stages_current Table">
    Section 29.12.5.1, “The events_stages_current Table”
   </a>
   .
          Unlike
   <a class="link" href="performance-schema-events-stages-current-table.html" title="29.12.5.1 The events_stages_current Table">
    <code class="literal">
     events_stages_current
    </code>
   </a>
   ,
   <a class="link" href="performance-schema-events-stages-history-long-table.html" title="29.12.5.3 The events_stages_history_long Table">
    <code class="literal">
     events_stages_history_long
    </code>
   </a>
   has no
          indexing.
  </p>
  <p>
   <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
    <code class="literal">
     TRUNCATE TABLE
    </code>
   </a>
   is permitted for
          the
   <a class="link" href="performance-schema-events-stages-history-long-table.html" title="29.12.5.3 The events_stages_history_long Table">
    <code class="literal">
     events_stages_history_long
    </code>
   </a>
   table. It removes the rows.
  </p>
  <p>
   For more information about the relationship between the three
          stage event tables, see
   <a class="xref" href="performance-schema-event-tables.html" title="29.9 Performance Schema Tables for Current and Historical Events">
    Section 29.9, “Performance Schema Tables for Current and Historical Events”
   </a>
   .
  </p>
  <p>
   For information about configuring whether to collect stage
          events, see
   <a class="xref" href="performance-schema-stage-tables.html" title="29.12.5 Performance Schema Stage Event Tables">
    Section 29.12.5, “Performance Schema Stage Event Tables”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
