Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code DEF204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Rechercher dans le manuel MySQL

15.14.8 Retrieving InnoDB Tablespace Metadata from INFORMATION_SCHEMA.FILES

The INFORMATION_SCHEMA.FILES table provides metadata about all InnoDB tablespace types including file-per-table tablespaces, general tablespaces, the system tablespace, temporary table tablespaces, and undo tablespaces (if present).

This section provides InnoDB-specific usage examples. For more information about data provided by the INFORMATION_SCHEMA.FILES table, see Section 25.11, “The INFORMATION_SCHEMA FILES Table”.

Note

The INNODB_TABLESPACES and INNODB_DATAFILES tables also provide metadata about InnoDB tablespaces, but data is limited to file-per-table, general, and undo tablespaces.

This query retrieves metadata about the InnoDB system tablespace from fields of the INFORMATION_SCHEMA.FILES table that are pertinent to InnoDB tablespaces. INFORMATION_SCHEMA.FILES fields that are not relevant to InnoDB always return NULL, and are excluded from the query.

  1. mysql> SELECT FILE_ID, FILE_NAME, FILE_TYPE, TABLESPACE_NAME, FREE_EXTENTS,
  2.        TOTAL_EXTENTS,  EXTENT_SIZE, INITIAL_SIZE, MAXIMUM_SIZE, AUTOEXTEND_SIZE, DATA_FREE, STATUS ENGINE
  3.        FROM INFORMATION_SCHEMA.FILES WHERE TABLESPACE_NAME LIKE 'innodb_system' \G
  4. *************************** 1. row ***************************
  5.         FILE_ID: 0
  6.       FILE_NAME: ./ibdata1
  7.       FILE_TYPE: TABLESPACE
  8. TABLESPACE_NAME: innodb_system
  9.    FREE_EXTENTS: 0
  10.   TOTAL_EXTENTS: 12
  11.     EXTENT_SIZE: 1048576
  12.    INITIAL_SIZE: 12582912
  13.    MAXIMUM_SIZE: NULL
  14. AUTOEXTEND_SIZE: 67108864
  15.       DATA_FREE: 4194304
  16.          ENGINE: NORMAL

This query retrieves the FILE_ID (equivalent to the space ID) and the FILE_NAME (which includes path information) for InnoDB file-per-table and general tablespaces. File-per-table and general tablespaces have a .ibd file extension.

  1. mysql> SELECT FILE_ID, FILE_NAME FROM INFORMATION_SCHEMA.FILES
  2.        WHERE FILE_NAME LIKE '%.ibd%' ORDER BY FILE_ID;
  3.     +---------+---------------------------------------+
  4.     | FILE_ID | FILE_NAME                             |
  5.     +---------+---------------------------------------+
  6.     |       2 | ./mysql/plugin.ibd                    |
  7.     |       3 | ./mysql/servers.ibd                   |
  8.     |       4 | ./mysql/help_topic.ibd                |
  9.     |       5 | ./mysql/help_category.ibd             |
  10.     |       6 | ./mysql/help_relation.ibd             |
  11.     |       7 | ./mysql/help_keyword.ibd              |
  12.     |       8 | ./mysql/time_zone_name.ibd            |
  13.     |       9 | ./mysql/time_zone.ibd                 |
  14.     |      10 | ./mysql/time_zone_transition.ibd      |
  15.     |      11 | ./mysql/time_zone_transition_type.ibd |
  16.     |      12 | ./mysql/time_zone_leap_second.ibd     |
  17.     |      13 | ./mysql/innodb_table_stats.ibd        |
  18.     |      14 | ./mysql/innodb_index_stats.ibd        |
  19.     |      15 | ./mysql/slave_relay_log_info.ibd      |
  20.     |      16 | ./mysql/slave_master_info.ibd         |
  21.     |      17 | ./mysql/slave_worker_info.ibd         |
  22.     |      18 | ./mysql/gtid_executed.ibd             |
  23.     |      19 | ./mysql/server_cost.ibd               |
  24.     |      20 | ./mysql/engine_cost.ibd               |
  25.     |      21 | ./sys/sys_config.ibd                  |
  26.     |      23 | ./test/t1.ibd                         |
  27.     |      26 | /home/user/test/test/t2.ibd           |
  28.     +---------+---------------------------------------+

This query retrieves the FILE_ID and FILE_NAME for the InnoDB global temporary tablespace. Global temporary tablespace file names are prefixed by ibtmp.

  1. mysql> SELECT FILE_ID, FILE_NAME FROM INFORMATION_SCHEMA.FILES
  2.        WHERE FILE_NAME LIKE '%ibtmp%';
  3. +---------+-----------+
  4. | FILE_ID | FILE_NAME |
  5. +---------+-----------+
  6. |      22 | ./ibtmp1  |
  7. +---------+-----------+

Similarly, InnoDB undo tablespace file names are prefixed by undo. The following query returns the FILE_ID and FILE_NAME for InnoDB undo tablespaces.

  1. mysql> SELECT FILE_ID, FILE_NAME FROM INFORMATION_SCHEMA.FILES
  2.        WHERE FILE_NAME LIKE '%undo%';

Zoek in de MySQL-handleiding

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 26/06/2006 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/mysql-rf-innodb-information-schema-files-table.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:en Manuel MySQL : https://dev.mysql.com/

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut