No cache version.

Caching disabled. Default setting for this page:enabled (code DEF204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher dans le manuel MySQL

15.14.7 InnoDB INFORMATION_SCHEMA Temporary Table Info Table

INNODB_TEMP_TABLE_INFO provides information about user-created InnoDB temporary tables that are active in the InnoDB instance. It does not provide information about internal InnoDB temporary tables used by the optimizer.

  1. mysql> SHOW TABLES FROM INFORMATION_SCHEMA LIKE 'INNODB_TEMP%';
  2. +---------------------------------------------+
  3. | Tables_in_INFORMATION_SCHEMA (INNODB_TEMP%) |
  4. +---------------------------------------------+
  5. | INNODB_TEMP_TABLE_INFO                      |
  6. +---------------------------------------------+

For the table definition, see Section 25.39.28, “The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table”.

Example 15.12 INNODB_TEMP_TABLE_INFO

This example demonstrates characteristics of the INNODB_TEMP_TABLE_INFO table.

  1. Create a simple InnoDB temporary table:

  2. Query INNODB_TEMP_TABLE_INFO to view the temporary table metadata.

    1. mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO\G
    2. *************************** 1. row ***************************
    3.             TABLE_ID: 194
    4.                 NAME: #sql7a79_1_0
    5.               N_COLS: 4
    6.                SPACE: 182

    The TABLE_ID is a unique identifier for the temporary table. The NAME column displays the system-generated name for the temporary table, which is prefixed with #sql. The number of columns (N_COLS) is 4 rather than 1 because InnoDB always creates three hidden table columns (DB_ROW_ID, DB_TRX_ID, and DB_ROLL_PTR).

  3. Restart MySQL and query INNODB_TEMP_TABLE_INFO.

    1. mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO\G

    An empty set is returned because INNODB_TEMP_TABLE_INFO and its data are not persisted to disk when the server is shut down.

  4. Create a new temporary table.

  5. Query INNODB_TEMP_TABLE_INFO to view the temporary table metadata.

    1. mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO\G
    2. *************************** 1. row ***************************
    3.             TABLE_ID: 196
    4.                 NAME: #sql7b0e_1_0
    5.               N_COLS: 4
    6.                SPACE: 184

    The SPACE ID may be different because it is dynamically generated when the server is started.



Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-innodb-information-schema-temp-table-info.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut