Rechercher dans le manuel MySQL

22.5.10 ndbinfo: The NDB Cluster Information Database

[+/-]

22.5.10.1 The ndbinfo arbitrator_validity_detail Table
22.5.10.2 The ndbinfo arbitrator_validity_summary Table
22.5.10.3 The ndbinfo blocks Table
22.5.10.4 The ndbinfo cluster_locks Table
22.5.10.5 The ndbinfo cluster_operations Table
22.5.10.6 The ndbinfo cluster_transactions Table
22.5.10.7 The ndbinfo config_nodes Table
22.5.10.8 The ndbinfo config_params Table
22.5.10.9 The ndbinfo config_values Table
22.5.10.10 The ndbinfo counters Table
22.5.10.11 The ndbinfo cpustat Table
22.5.10.12 The ndbinfo cpustat_50ms Table
22.5.10.13 The ndbinfo cpustat_1sec Table
22.5.10.14 The ndbinfo cpustat_20sec Table
22.5.10.15 The ndbinfo dict_obj_info Table
22.5.10.16 The ndbinfo dict_obj_types Table
22.5.10.17 The ndbinfo disk_write_speed_base Table
22.5.10.18 The ndbinfo disk_write_speed_aggregate Table
22.5.10.19 The ndbinfo disk_write_speed_aggregate_node Table
22.5.10.20 The ndbinfo diskpagebuffer Table
22.5.10.21 The ndbinfo error_messages Table
22.5.10.22 The ndbinfo locks_per_fragment Table
22.5.10.23 The ndbinfo logbuffers Table
22.5.10.24 The ndbinfo logspaces Table
22.5.10.25 The ndbinfo membership Table
22.5.10.26 The ndbinfo memoryusage Table
22.5.10.27 The ndbinfo memory_per_fragment Table
22.5.10.28 The ndbinfo nodes Table
22.5.10.29 The ndbinfo operations_per_fragment Table
22.5.10.30 The ndbinfo processes Table
22.5.10.31 The ndbinfo resources Table
22.5.10.32 The ndbinfo restart_info Table
22.5.10.33 The ndbinfo server_locks Table
22.5.10.34 The ndbinfo server_operations Table
22.5.10.35 The ndbinfo server_transactions Table
22.5.10.36 The ndbinfo table_distribution_status Table
22.5.10.37 The ndbinfo table_fragments Table
22.5.10.38 The ndbinfo table_info Table
22.5.10.39 The ndbinfo table_replicas Table
22.5.10.40 The ndbinfo tc_time_track_stats Table
22.5.10.41 The ndbinfo threadblocks Table
22.5.10.42 The ndbinfo threads Table
22.5.10.43 The ndbinfo threadstat Table
22.5.10.44 The ndbinfo transporters Table

ndbinfo is a database containing information specific to NDB Cluster.

This database contains a number of tables, each providing a different sort of data about NDB Cluster node status, resource usage, and operations. You can find more detailed information about each of these tables in the next several sections.

ndbinfo is included with NDB Cluster support in the MySQL Server; no special compilation or configuration steps are required; the tables are created by the MySQL Server when it connects to the cluster. You can verify that ndbinfo support is active in a given MySQL Server instance using SHOW PLUGINS; if ndbinfo support is enabled, you should see a row containing ndbinfo in the Name column and ACTIVE in the Status column, as shown here (emphasized text):

  1. mysql> SHOW PLUGINS;
  2. +----------------------------------+--------+--------------------+---------+---------+
  3. | Name                             | Status | Type               | Library | License |
  4. +----------------------------------+--------+--------------------+---------+---------+
  5. | binlog                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  6. | mysql_native_password            | ACTIVE | AUTHENTICATION     | NULL    | GPL     |
  7. | sha256_password                  | ACTIVE | AUTHENTICATION     | NULL    | GPL     |
  8. | MRG_MYISAM                       | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  9. | MEMORY                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  10. | CSV                              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  11. | MyISAM                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  12. | InnoDB                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  13. | INNODB_TRX                       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  14. | INNODB_LOCKS                     | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  15. | INNODB_LOCK_WAITS                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  16. | INNODB_CMP                       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  17. | INNODB_CMP_RESET                 | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  18. | INNODB_CMPMEM                    | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  19. | INNODB_CMPMEM_RESET              | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  20. | INNODB_CMP_PER_INDEX             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  21. | INNODB_CMP_PER_INDEX_RESET       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  22. | INNODB_BUFFER_PAGE               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  23. | INNODB_BUFFER_PAGE_LRU           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  24. | INNODB_BUFFER_POOL_STATS         | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  25. | INNODB_TEMP_TABLE_INFO           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  26. | INNODB_METRICS                   | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  27. | INNODB_FT_DEFAULT_STOPWORD       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  28. | INNODB_FT_DELETED                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  29. | INNODB_FT_BEING_DELETED          | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  30. | INNODB_FT_CONFIG                 | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  31. | INNODB_FT_INDEX_CACHE            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  32. | INNODB_FT_INDEX_TABLE            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  33. | INNODB_SYS_TABLES                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  34. | INNODB_SYS_TABLESTATS            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  35. | INNODB_SYS_INDEXES               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  36. | INNODB_SYS_COLUMNS               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  37. | INNODB_SYS_FIELDS                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  38. | INNODB_SYS_FOREIGN               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  39. | INNODB_SYS_FOREIGN_COLS          | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  40. | INNODB_SYS_TABLESPACES           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  41. | INNODB_SYS_DATAFILES             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  42. | INNODB_SYS_VIRTUAL               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  43. | PERFORMANCE_SCHEMA               | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  44. | ndbCluster                      | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  45. | ndbinfo                          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  46. | ndb_transid_mysql_connection_map | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
  47. | BLACKHOLE                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  48. | ARCHIVE                          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  49. | partition                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
  50. | ngram                            | ACTIVE | FTPARSER           | NULL    | GPL     |
  51. +----------------------------------+--------+--------------------+---------+---------+
  52. 46 rows in set (0.00 sec)

You can also do this by checking the output of SHOW ENGINES for a line including ndbinfo in the Engine column and YES in the Support column, as shown here (emphasized text):

  1. mysql> SHOW ENGINES\G
  2. *************************** 1. row ***************************
  3.       Engine: ndbcluster
  4.      Support: YES
  5.      Comment: Clustered, fault-tolerant tables
  6.           XA: NO
  7.   Savepoints: NO
  8. *************************** 2. row ***************************
  9.       Engine: CSV
  10.      Support: YES
  11.      Comment: CSV storage engine
  12.           XA: NO
  13.   Savepoints: NO
  14. *************************** 3. row ***************************
  15.       Engine: InnoDB
  16.      Support: DEFAULT
  17.      Comment: Supports transactions, row-level locking, and foreign keys
  18.           XA: YES
  19.   Savepoints: YES
  20. *************************** 4. row ***************************
  21.       Engine: BLACKHOLE
  22.      Support: YES
  23.      Comment: /dev/null storage engine (anything you write to it disappears)
  24.           XA: NO
  25.   Savepoints: NO
  26. *************************** 5. row ***************************
  27.       Engine: MyISAM
  28.      Support: YES
  29.      Comment: MyISAM storage engine
  30.           XA: NO
  31.   Savepoints: NO
  32. *************************** 6. row ***************************
  33.       Engine: MRG_MYISAM
  34.      Support: YES
  35.      Comment: Collection of identical MyISAM tables
  36.           XA: NO
  37.   Savepoints: NO
  38. *************************** 7. row ***************************
  39.       Engine: ARCHIVE
  40.      Support: YES
  41.      Comment: Archive storage engine
  42.           XA: NO
  43.   Savepoints: NO
  44. *************************** 8. row ***************************
  45.       Engine: ndbinfo
  46.      Support: YES
  47.      Comment: NDB Cluster system information storage engine
  48.           XA: NO
  49.   Savepoints: NO
  50. *************************** 9. row ***************************
  51.       Engine: PERFORMANCE_SCHEMA
  52.      Support: YES
  53.      Comment: Performance Schema
  54.           XA: NO
  55.   Savepoints: NO
  56. *************************** 10. row ***************************
  57.       Engine: MEMORY
  58.      Support: YES
  59.      Comment: Hash based, stored in memory, useful for temporary tables
  60.           XA: NO
  61.   Savepoints: NO
  62. 10 rows in set (0.00 sec)

If ndbinfo support is enabled, then you can access ndbinfo using SQL statements in mysql or another MySQL client. For example, you can see ndbinfo listed in the output of SHOW DATABASES, as shown here (emphasized text):

  1. mysql> SHOW DATABASES;
  2. +--------------------+
  3. | Database           |
  4. +--------------------+
  5. | information_schema |
  6. | mysql              |
  7. | ndbinfo            |
  8. | performance_schema |
  9. | sys                |
  10. +--------------------+
  11. 5 rows in set (0.04 sec)

If the mysqld process was not started with the --ndbcluster option, ndbinfo is not available and is not displayed by SHOW DATABASES. If mysqld was formerly connected to an NDB Cluster but the cluster becomes unavailable (due to events such as cluster shutdown, loss of network connectivity, and so forth), ndbinfo and its tables remain visible, but an attempt to access any tables (other than blocks or config_params) fails with Got error 157 'Connection to NDB failed' from NDBINFO.

With the exception of the blocks and config_params tables, what we refer to as ndbinfo tables are actually views generated from internal NDB tables not normally visible to the MySQL Server.

All ndbinfo tables are read-only, and are generated on demand when queried. Because many of them are generated in parallel by the data nodes while other are specific to a given SQL node, they are not guaranteed to provide a consistent snapshot.

In addition, pushing down of joins is not supported on ndbinfo tables; so joining large ndbinfo tables can require transfer of a large amount of data to the requesting API node, even when the query makes use of a WHERE clause.

ndbinfo tables are not included in the query cache. (Bug #59831)

You can select the ndbinfo database with a USE statement, and then issue a SHOW TABLES statement to obtain a list of tables, just as for any other database, like this:

  1. mysql> USE ndbinfo;
  2. Database changed
  3.  
  4. mysql> SHOW TABLES;
  5. +---------------------------------+
  6. | Tables_in_ndbinfo               |
  7. +---------------------------------+
  8. | arbitrator_validity_detail      |
  9. | arbitrator_validity_summary     |
  10. | blocks                          |
  11. | cluster_locks                   |
  12. | cluster_operations              |
  13. | cluster_transactions            |
  14. | config_nodes                    |
  15. | config_params                   |
  16. | config_values                   |
  17. | counters                        |
  18. | cpustat                         |
  19. | cpustat_1sec                    |
  20. | cpustat_20sec                   |
  21. | cpustat_50ms                    |
  22. | dict_obj_info                   |
  23. | dict_obj_types                  |
  24. | disk_write_speed_aggregate      |
  25. | disk_write_speed_aggregate_node |
  26. | disk_write_speed_base           |
  27. | diskpagebuffer                  |
  28. | error_messages                  |
  29. | locks_per_fragment              |
  30. | logbuffers                      |
  31. | logspaces                       |
  32. | membership                      |
  33. | memory_per_fragment             |
  34. | memoryusage                     |
  35. | nodes                           |
  36. | operations_per_fragment         |
  37. | processes                       |
  38. | resources                       |
  39. | restart_info                    |
  40. | server_locks                    |
  41. | server_operations               |
  42. | server_transactions             |
  43. | table_distribution_status       |
  44. | table_fragments                 |
  45. | table_info                      |
  46. | table_replicas                  |
  47. | tc_time_track_stats             |
  48. | threadblocks                    |
  49. | threads                         |
  50. | threadstat                      |
  51. | transporters                    |
  52. +---------------------------------+
  53. 44 rows in set (0.00 sec)

In NDB 8.0, all ndbinfo tables use the NDB storage engine; however, an ndbinfo entry still appears in the output of SHOW ENGINES and SHOW PLUGINS as described previously.

You can execute SELECT statements against these tables, just as you would normally expect:

  1. mysql> SELECT * FROM memoryusage;
  2. +---------+---------------------+--------+------------+------------+-------------+
  3. | node_id | memory_type         | used   | used_pages | total      | total_pages |
  4. +---------+---------------------+--------+------------+------------+-------------+
  5. |       5 | Data memory         | 753664 |         23 | 1073741824 |       32768 |
  6. |       5 | Index memory        | 163840 |         20 | 1074003968 |      131104 |
  7. |       5 | Long message buffer |   2304 |          9 |   67108864 |      262144 |
  8. |       6 | Data memory         | 753664 |         23 | 1073741824 |       32768 |
  9. |       6 | Index memory        | 163840 |         20 | 1074003968 |      131104 |
  10. |       6 | Long message buffer |   2304 |          9 |   67108864 |      262144 |
  11. +---------+---------------------+--------+------------+------------+-------------+
  12. 6 rows in set (0.02 sec)

More complex queries, such as the two following SELECT statements using the memoryusage table, are possible:

  1. mysql> SELECT SUM(used) as 'Data Memory Used, All Nodes'
  2.      >     FROM memoryusage
  3.      >     WHERE memory_type = 'Data memory';
  4. +-----------------------------+
  5. | Data Memory Used, All Nodes |
  6. +-----------------------------+
  7. |                        6460 |
  8. +-----------------------------+
  9. 1 row in set (0.37 sec)
  10.  
  11. mysql> SELECT SUM(max) as 'Total IndexMemory Available'
  12.      >     FROM memoryusage
  13.      >     WHERE memory_type = 'Index memory';
  14. +-----------------------------+
  15. | Total IndexMemory Available |
  16. +-----------------------------+
  17. |                       25664 |
  18. +-----------------------------+
  19. 1 row in set (0.33 sec)

ndbinfo table and column names are case sensitive (as is the name of the ndbinfo database itself). These identifiers are in lowercase. Trying to use the wrong lettercase results in an error, as shown in this example:

  1. mysql> SELECT * FROM nodes;
  2. +---------+--------+---------+-------------+
  3. | node_id | uptime | status  | start_phase |
  4. +---------+--------+---------+-------------+
  5. |       1 |  13602 | STARTED |           0 |
  6. |       2 |     16 | STARTED |           0 |
  7. +---------+--------+---------+-------------+
  8. 2 rows in set (0.04 sec)
  9.  
  10. mysql> SELECT * FROM Nodes;
  11. ERROR 1146 (42S02): Table 'ndbinfo.Nodes' doesn't exist

mysqldump ignores the ndbinfo database entirely, and excludes it from any output. This is true even when using the --databases or --all-databases option.

NDB Cluster also maintains tables in the INFORMATION_SCHEMA information database, including the FILES table which contains information about files used for NDB Cluster Disk Data storage, and the ndb_transid_mysql_connection_map table, which shows the relationships between transactions, transaction coordinators, and NDB Cluster API nodes. For more information, see the descriptions of the tables or Section 22.5.11, “INFORMATION_SCHEMA Tables for NDB Cluster”.


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-mysql-cluster-ndbinfo.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