<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="sys-schema-table-lock-waits">
      </a>
      30.4.3.28 The schema_table_lock_waits and x$schema_table_lock_waits Views
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045062455408">
  </a>
  <a class="indexterm" name="idm46045062453952">
  </a>
  <a class="indexterm" name="idm46045062452448">
  </a>
  <a class="indexterm" name="idm46045062450944">
  </a>
  <p>
   These views display which sessions are blocked waiting on
          metadata locks, and what is blocking them.
  </p>
  <p>
   The column descriptions here are brief. For additional
          information, see the description of the Performance Schema
   <a class="link" href="performance-schema-metadata-locks-table.html" title="29.12.13.3 The metadata_locks Table">
    <code class="literal">
     metadata_locks
    </code>
   </a>
   table at
   <a class="xref" href="performance-schema-metadata-locks-table.html" title="29.12.13.3 The metadata_locks Table">
    Section 29.12.13.3, “The metadata_locks Table”
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="sys-schema-table-lock-waits.html" title="30.4.3.28 The schema_table_lock_waits and x$schema_table_lock_waits Views">
    <code class="literal">
     schema_table_lock_waits
    </code>
   </a>
   and
   <a class="link" href="sys-schema-table-lock-waits.html" title="30.4.3.28 The schema_table_lock_waits and x$schema_table_lock_waits Views">
    <code class="literal">
     x$schema_table_lock_waits
    </code>
   </a>
   views
          have these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       object_schema
      </code>
     </p>
     <p>
      The schema containing the object to be locked.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       object_name
      </code>
     </p>
     <p>
      The name of the instrumented object.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_thread_id
      </code>
     </p>
     <p>
      The thread ID of the thread that is waiting for the lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_pid
      </code>
     </p>
     <p>
      The processlist ID of the thread that is waiting for the
              lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_account
      </code>
     </p>
     <p>
      The account associated with the session that is waiting
              for the lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_lock_type
      </code>
     </p>
     <p>
      The type of the waiting lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_lock_duration
      </code>
     </p>
     <p>
      How long the waiting lock has been waiting.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_query
      </code>
     </p>
     <p>
      The statement that is waiting for the lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_query_secs
      </code>
     </p>
     <p>
      How long the statement has been waiting, in seconds.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_query_rows_affected
      </code>
     </p>
     <p>
      The number of rows affected by the statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       waiting_query_rows_examined
      </code>
     </p>
     <p>
      The number of rows read from storage engines by the
              statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       blocking_thread_id
      </code>
     </p>
     <p>
      The thread ID of the thread that is blocking the waiting
              lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       blocking_pid
      </code>
     </p>
     <p>
      The processlist ID of the thread that is blocking the
              waiting lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       blocking_account
      </code>
     </p>
     <p>
      The account associated with the thread that is blocking
              the waiting lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       blocking_lock_type
      </code>
     </p>
     <p>
      The type of lock that is blocking the waiting lock.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       blocking_lock_duration
      </code>
     </p>
     <p>
      How long the blocking lock has been held.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       sql_kill_blocking_query
      </code>
     </p>
     <p>
      The
      <a class="link" href="kill.html" title="15.7.8.4 KILL Statement">
       <code class="literal">
        KILL
       </code>
      </a>
      statement to
              execute to kill the blocking statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       sql_kill_blocking_connection
      </code>
     </p>
     <p>
      The
      <a class="link" href="kill.html" title="15.7.8.4 KILL Statement">
       <code class="literal">
        KILL
       </code>
      </a>
      statement to
              execute to kill the session running the blocking
              statement.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
