このページは機械翻訳したものです。
- 23.5.14.1 ndbinfo arbitrator_validity_detail テーブル
- 23.5.14.2 ndbinfo arbitrator_validity_summary テーブル
- 23.5.14.3 ndbinfo backup_id テーブル
- 23.5.14.4 ndbinfo blocks テーブル
- 23.5.14.5 ndbinfo cluster_locks テーブル
- 23.5.14.6 ndbinfo cluster_operations テーブル
- 23.5.14.7 ndbinfo cluster_transactions テーブル
- 23.5.14.8 ndbinfo config_nodes テーブル
- 23.5.14.9 ndbinfo config_params テーブル
- 23.5.14.10 ndbinfo config_values テーブル
- 23.5.14.11 ndbinfo counters テーブル
- 23.5.14.12 ndbinfo cpudata テーブル
- 23.5.14.13 ndbinfo cpudata_1sec テーブル
- 23.5.14.14 ndbinfo cpudata_20sec テーブル
- 23.5.14.15 ndbinfo cpudata_50ms テーブル
- 23.5.14.16 ndbinfo cpuinfo テーブル
- 23.5.14.17 ndbinfo cpustat テーブル
- 23.5.14.18 ndbinfo cpustat_50ms テーブル
- 23.5.14.19 ndbinfo cpustat_1sec テーブル
- 23.5.14.20 ndbinfo cpustat_20sec テーブル
- 23.5.14.21 ndbinfo dict_obj_info テーブル
- 23.5.14.22 ndbinfo dict_obj_tree テーブル
- 23.5.14.23 ndbinfo dict_obj_types テーブル
- 23.5.14.24 ndbinfo disk_write_speed_base テーブル
- 23.5.14.25 ndbinfo disk_write_speed_aggregate テーブル
- 23.5.14.26 ndbinfo disk_write_speed_aggregate_node テーブル
- 23.5.14.27 ndbinfo diskpagebuffer テーブル
- 23.5.14.28 ndbinfo diskstat テーブル
- 23.5.14.29 ndbinfo diskstats_1sec テーブル
- 23.5.14.30 ndbinfo error_messages テーブル
- 23.5.14.31 ndbinfo hwinfo テーブル
- 23.5.14.32 ndbinfo locks_per_fragment テーブル
- 23.5.14.33 ndbinfo logbuffers テーブル
- 23.5.14.34 ndbinfo logspaces テーブル
- 23.5.14.35 ndbinfo membership テーブル
- 23.5.14.36 ndbinfo memoryusage テーブル
- 23.5.14.37 ndbinfo memory_per_fragment テーブル
- 23.5.14.38 ndbinfo nodes テーブル
- 23.5.14.39 ndbinfo operations_per_fragment テーブル
- 23.5.14.40 ndbinfo pgman_time_track_stats テーブル
- 23.5.14.41 ndbinfo processes テーブル
- 23.5.14.42 ndbinfo resources テーブル
- 23.5.14.43 ndbinfo restart_info テーブル
- 23.5.14.44 ndbinfo server_locks テーブル
- 23.5.14.45 ndbinfo server_operations テーブル
- 23.5.14.46 ndbinfo server_transactions テーブル
- 23.5.14.47 ndbinfo table_distribution_status テーブル
- 23.5.14.48 ndbinfo table_fragments テーブル
- 23.5.14.49 ndbinfo table_info テーブル
- 23.5.14.50 ndbinfo table_replicas テーブル
- 23.5.14.51 ndbinfo tc_time_track_stats テーブル
- 23.5.14.52 ndbinfo threadblocks テーブル
- 23.5.14.53 ndbinfo threads テーブル
- 23.5.14.54 ndbinfo threadstat テーブル
- 23.5.14.55 ndbinfo transporters テーブル
ndbinfo は NDB Cluster に固有の情報を含むデータベースです。
このデータベースには多数のテーブルが含まれており、それぞれ NDB Cluster ノードのステータス、リソース使用率、および操作に関する異なる種類のデータを提供します。 次のいくつかのセクションで、これらの各テーブルに関する詳細な情報を見つけることができます。
ndbinfo は NDB Cluster のサポートとともに MySQL Server に含まれており、特別なコンパイルや構成の手順は必要ありません。テーブルは、クラスタへの接続時に MySQL Server によって作成されます。SHOW PLUGINS を使用すると、特定の MySQL サーバーインスタンスでndbinfo サポートがアクティブになっていることを確認できます。ndbinfo サポートが有効になっている場合は、次に (強調表示したテキストで) 示すように、Name カラムにndbinfo が含まれ、Status カラムにACTIVE が含まれる行が表示されます。
mysql> SHOW PLUGINS;+----------------------------------+--------+--------------------+---------+---------+| Name | Status | Type | Library | License |+----------------------------------+--------+--------------------+---------+---------+| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL || mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL || sha256_password | ACTIVE | AUTHENTICATION | NULL | GPL || MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL || MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL || CSV | ACTIVE | STORAGE ENGINE | NULL | GPL || MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL || InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL || INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_CMP_PER_INDEX | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_CMP_PER_INDEX_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_TEMP_TABLE_INFO | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_FT_DEFAULT_STOPWORD | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_FT_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_FT_BEING_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_FT_CONFIG | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_FT_INDEX_CACHE | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_FT_INDEX_TABLE | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_DATAFILES | ACTIVE | INFORMATION SCHEMA | NULL | GPL || INNODB_SYS_VIRTUAL | ACTIVE | INFORMATION SCHEMA | NULL | GPL || PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL || ndbCluster | ACTIVE | STORAGE ENGINE | NULL | GPL || ndbinfo | ACTIVE | STORAGE ENGINE | NULL | GPL || ndb_transid_mysql_connection_map | ACTIVE | INFORMATION SCHEMA | NULL | GPL || BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL || ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL || partition | ACTIVE | STORAGE ENGINE | NULL | GPL || ngram | ACTIVE | FTPARSER | NULL | GPL |+----------------------------------+--------+--------------------+---------+---------+46 rows in set (0.00 sec) また、次に (強調表示されたテキストで) 示すように、Engine カラムにndbinfo が含まれ、Support カラムにYES が含まれる行があるかどうかについて、SHOW ENGINES の出力をチェックすることで、これを実行することもできます。
mysql> SHOW ENGINES\G*************************** 1. row *************************** Engine: ndbcluster Support: YES Comment: Clustered, fault-tolerant tablesTransactions: YES XA: NO Savepoints: NO*************************** 2. row *************************** Engine: CSV Support: YES Comment: CSV storage engineTransactions: NO XA: NO Savepoints: NO*************************** 3. row *************************** Engine: InnoDB Support: DEFAULT Comment: Supports transactions, row-level locking, and foreign keysTransactions: YES XA: YES Savepoints: YES*************************** 4. row *************************** Engine: BLACKHOLE Support: YES Comment: /dev/null storage engine (anything you write to it disappears)Transactions: NO XA: NO Savepoints: NO*************************** 5. row *************************** Engine: MyISAM Support: YES Comment: MyISAM storage engineTransactions: NO XA: NO Savepoints: NO*************************** 6. row *************************** Engine: MRG_MYISAM Support: YES Comment: Collection of identical MyISAM tablesTransactions: NO XA: NO Savepoints: NO*************************** 7. row *************************** Engine: ARCHIVE Support: YES Comment: Archive storage engineTransactions: NO XA: NO Savepoints: NO*************************** 8. row *************************** Engine: ndbinfo Support: YES Comment: NDB Cluster system information storage engineTransactions: NO XA: NO Savepoints: NO*************************** 9. row *************************** Engine: PERFORMANCE_SCHEMA Support: YES Comment: Performance SchemaTransactions: NO XA: NO Savepoints: NO*************************** 10. row *************************** Engine: MEMORY Support: YES Comment: Hash based, stored in memory, useful for temporary tablesTransactions: NO XA: NO Savepoints: NO10 rows in set (0.00 sec)ndbinfo サポートが有効になっている場合は、mysql や別の MySQL クライアントで SQL ステートメントを使用して、ndbinfo にアクセスできます。 たとえば、次に示すように、SHOW DATABASES の出力にndbinfo がリストされます (強調表示されたテキスト):
mysql> SHOW DATABASES;+--------------------+| Database |+--------------------+| information_schema || mysql || ndbinfo || performance_schema || sys |+--------------------+5 rows in set (0.04 sec)--ndbcluster オプションを付けてmysqld プロセスが起動されなかった場合は、ndbinfo を使用できず、SHOW DATABASES によって表示されません。mysqld が以前 NDB Cluster に接続されていたものの、クラスタが使用できなくなった場合 (クラスタのシャットダウン、ネットワーク接続の損失などのイベントのため)、ndbinfo とそのテーブルは表示されたままですが、(blocks やconfig_params 以外の) テーブルにアクセスしようとすると「NDBINFO からエラー 157NDB への接続に失敗しましたが発生しました」で失敗します。
blocks およびconfig_params テーブルを除いて、ndbinfo「テーブル」と呼ばれるものは、実際には、MySQL サーバーから通常見えない内部NDB テーブルから生成されるビューです。
ndbinfo テーブルはすべて読み取り専用であり、クエリーの実行時に要求に応じて生成されます。 これらの多くはデータノードによって並列して生成されますが、その他は特定の SQL ノードに固有であるため、一貫性のあるスナップショットを提供する保証はありません。
さらに、ndbinfo テーブルでは、結合のプッシュダウンがサポートされていません。そのため、クエリーでWHERE 句を使用している場合でも、大きなndbinfo テーブルの結合には、リクエスト元の API ノードに大量のデータを転送する必要があることがあります。
クエリーキャッシュに、ndbinfo テーブルが含まれていません。 (Bug #59831)
その他のデータベースの場合と同様に、USE ステートメントでndbinfo データベースを選択してから、SHOW TABLES ステートメントを発行すると、次のようなテーブルのリストを取得できます。
mysql> USE ndbinfo;Database changedmysql> SHOW TABLES;+---------------------------------+| Tables_in_ndbinfo |+---------------------------------+| arbitrator_validity_detail || arbitrator_validity_summary || blocks || cluster_locks || cluster_operations || cluster_transactions || config_nodes || config_params || config_values || counters || cpustat || cpustat_1sec || cpustat_20sec || cpustat_50ms || dict_obj_info || dict_obj_types || disk_write_speed_aggregate || disk_write_speed_aggregate_node || disk_write_speed_base || diskpagebuffer || error_messages || locks_per_fragment || logbuffers || logspaces || membership || memory_per_fragment || memoryusage || nodes || operations_per_fragment || processes || resources || restart_info || server_locks || server_operations || server_transactions || table_distribution_status || table_fragments || table_info || table_replicas || tc_time_track_stats || threadblocks || threads || threadstat || transporters |+---------------------------------+44 rows in set (0.00 sec) NDB 8.0 では、すべてのndbinfo テーブルがNDB ストレージエンジンを使用しますが、前に説明したように、SHOW ENGINES およびSHOW PLUGINS の出力には引き続きndbinfo エントリが表示されます。
通常の想定どおりに、これらのテーブルに対してSELECT ステートメントを実行できます。
mysql> SELECT * FROM memoryusage;+---------+---------------------+--------+------------+------------+-------------+| node_id | memory_type | used | used_pages | total | total_pages |+---------+---------------------+--------+------------+------------+-------------+| 5 | Data memory | 753664 | 23 | 1073741824 | 32768 || 5 | Index memory | 163840 | 20 | 1074003968 | 131104 || 5 | Long message buffer | 2304 | 9 | 67108864 | 262144 || 6 | Data memory | 753664 | 23 | 1073741824 | 32768 || 6 | Index memory | 163840 | 20 | 1074003968 | 131104 || 6 | Long message buffer | 2304 | 9 | 67108864 | 262144 |+---------+---------------------+--------+------------+------------+-------------+6 rows in set (0.02 sec)memoryusage テーブルを使用する次の 2 つのSELECT ステートメントのような、さらに複雑なクエリーも実行できます。
mysql> SELECT SUM(used) as 'Data Memory Used, All Nodes' > FROM memoryusage > WHERE memory_type = 'Data memory';+-----------------------------+| Data Memory Used, All Nodes |+-----------------------------+| 6460 |+-----------------------------+1 row in set (0.37 sec)mysql> SELECT SUM(max) as 'Total IndexMemory Available' > FROM memoryusage > WHERE memory_type = 'Index memory';+-----------------------------+| Total IndexMemory Available |+-----------------------------+| 25664 |+-----------------------------+1 row in set (0.33 sec)ndbinfo のテーブル名およびカラム名では、大/小文字が区別されます (ndbinfo データベース自体の名前と同様)。 これらの識別子は小文字です。 大文字と小文字を誤って使用すると、次の例で示すようなエラーが発生します。
mysql> SELECT * FROM nodes;+---------+--------+---------+-------------+| node_id | uptime | status | start_phase |+---------+--------+---------+-------------+| 1 | 13602 | STARTED | 0 || 2 | 16 | STARTED | 0 |+---------+--------+---------+-------------+2 rows in set (0.04 sec)mysql> SELECT * FROM Nodes;ERROR 1146 (42S02): Table 'ndbinfo.Nodes' doesn't existmysqldump は、ndbinfo データベースを完全に無視し、どの出力からも除外します。 このことは、--databases または--all-databases オプションを使用する場合でも当てはまります。
NDB Cluster は、NDB Cluster ディスクデータストレージに使用されるファイルに関する情報を含むFILES テーブルや、トランザクション、トランザクションコーディネータ、NDB Cluster API ノード間の関係を示すndb_transid_mysql_connection_map テーブルなど、INFORMATION_SCHEMA 情報データベース内のテーブルも保持します。 詳細は、テーブルまたはセクション23.5.15「NDB Cluster の INFORMATION_SCHEMA テーブル」 の説明を参照してください。