Loading...
MySQL 9.5 Reference Manual 9.5의 25.6.15 ndbinfo: The NDB Cluster Information Database의 한국어 번역본입니다.
아래의 경우에 피드백에서 신고해주신다면 반영하겠습니다.
감사합니다 :)
25.6.15.1 The ndbinfo arbitrator_validity_detail Table
25.6.15.2 The ndbinfo arbitrator_validity_summary Table
25.6.15.3 The ndbinfo backup_id Table
25.6.15.4 The ndbinfo blobs Table
25.6.15.5 The ndbinfo blocks Table
25.6.15.6 The ndbinfo certificates Table
25.6.15.7 The ndbinfo cluster_locks Table
25.6.15.8 The ndbinfo cluster_operations Table
25.6.15.9 The ndbinfo cluster_transactions Table
25.6.15.10 The ndbinfo config_nodes Table
25.6.15.11 The ndbinfo config_params Table
25.6.15.12 The ndbinfo config_values Table
25.6.15.13 The ndbinfo counters Table
25.6.15.14 The ndbinfo cpudata Table
25.6.15.15 The ndbinfo cpudata_1sec Table
25.6.15.16 The ndbinfo cpudata_20sec Table
25.6.15.17 The ndbinfo cpudata_50ms Table
25.6.15.18 The ndbinfo cpuinfo Table
25.6.15.19 The ndbinfo cpustat Table
25.6.15.20 The ndbinfo cpustat_50ms Table
25.6.15.21 The ndbinfo cpustat_1sec Table
25.6.15.22 The ndbinfo cpustat_20sec Table
25.6.15.23 The ndbinfo dictionary_columns Table
25.6.15.24 The ndbinfo dictionary_tables Table
25.6.15.25 The ndbinfo dict_obj_info Table
25.6.15.26 The ndbinfo dict_obj_tree Table
25.6.15.27 The ndbinfo dict_obj_types Table
25.6.15.28 The ndbinfo disk_write_speed_base Table
25.6.15.29 The ndbinfo disk_write_speed_aggregate Table
25.6.15.30 The ndbinfo disk_write_speed_aggregate_node Table
25.6.15.31 The ndbinfo diskpagebuffer Table
25.6.15.32 The ndbinfo diskstat Table
25.6.15.33 The ndbinfo diskstats_1sec Table
25.6.15.34 The ndbinfo error_messages Table
25.6.15.35 The ndbinfo events Table
25.6.15.36 The ndbinfo files Table
25.6.15.37 The ndbinfo foreign_keys Table
25.6.15.38 The ndbinfo hash_maps Table
25.6.15.39 The ndbinfo hwinfo Table
25.6.15.40 The ndbinfo index_columns Table
25.6.15.41 The ndbinfo index_stats Table
25.6.15.42 The ndbinfo locks_per_fragment Table
25.6.15.43 The ndbinfo logbuffers Table
25.6.15.44 The ndbinfo logspaces Table
25.6.15.45 The ndbinfo membership Table
25.6.15.46 The ndbinfo memoryusage Table
25.6.15.47 The ndbinfo memory_per_fragment Table
25.6.15.48 The ndbinfo nodes Table
25.6.15.49 The ndbinfo operations_per_fragment Table
25.6.15.50 The ndbinfo pgman_time_track_stats Table
25.6.15.51 The ndbinfo processes Table
25.6.15.52 The ndbinfo resources Table
25.6.15.53 The ndbinfo restart_info Table
25.6.15.54 The ndbinfo server_locks Table
25.6.15.55 The ndbinfo server_operations Table
25.6.15.56 The ndbinfo server_transactions Table
25.6.15.57 The ndbinfo table_distribution_status Table
25.6.15.58 The ndbinfo table_fragments Table
25.6.15.59 The ndbinfo table_info Table
25.6.15.60 The ndbinfo table_replicas Table
25.6.15.61 The ndbinfo tc_time_track_stats Table
25.6.15.62 The ndbinfo threadblocks Table
25.6.15.63 The ndbinfo threads Table
25.6.15.64 The ndbinfo threadstat Table
25.6.15.65 The ndbinfo transporter_details Table
25.6.15.66 The ndbinfo transporters Table
ndbinfo는 NDB Cluster에만 특화된 정보를 포함하는 데이터베이스입니다.
이 데이터베이스에는 여러 개의 테이블이 포함되어 있으며, 각각은 NDB Cluster 노드 상태, 리소스 사용량, 작업에 대한 서로 다른 종류의 데이터를 제공합니다. 이러한 각 테이블에 대한 보다 자세한 정보는 이어지는 여러 섹션에서 찾을 수 있습니다.
ndbinfo는 MySQL Server의 NDB Cluster 지원에 포함되어 있습니다. 별도의 특수한 컴파일이나 구성 단계는 필요하지 않습니다. 이 테이블들은 MySQL Server가 클러스터에 연결될 때 MySQL Server에 의해 생성됩니다. 주어진 MySQL Server 인스턴스에서 ndbinfo 지원이 활성화되어 있는지는 SHOW PLUGINS을 사용하여 확인할 수 있습니다. ndbinfo 지원이 활성화되어 있다면, Name 컬럼에 ndbinfo가, Status 컬럼에 ACTIVE가 포함된 로우가 다음과 같이 표시됩니다(강조된 텍스트):
1mysql> SHOW PLUGINS; 2+----------------------------------+----------+--------------------+---------+---------+ 3| Name | Status | Type | Library | License | 4+----------------------------------+----------+--------------------+---------+---------+ 5| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL | 6| sha256_password | ACTIVE | AUTHENTICATION | NULL | GPL | 7| caching_sha2_password | ACTIVE | AUTHENTICATION | NULL | GPL | 8| daemon_keyring_proxy_plugin | ACTIVE | DAEMON | NULL | GPL | 9| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL | 10| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL | 11| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL | 12| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 13| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 14| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 15| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 16| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 17| INNODB_CMP_PER_INDEX | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 18| INNODB_CMP_PER_INDEX_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 19| INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 20| INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 21| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 22| INNODB_TEMP_TABLE_INFO | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 23| INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 24| INNODB_FT_DEFAULT_STOPWORD | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 25| INNODB_FT_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 26| INNODB_FT_BEING_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 27| INNODB_FT_CONFIG | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 28| INNODB_FT_INDEX_CACHE | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 29| INNODB_FT_INDEX_TABLE | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 30| INNODB_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 31| INNODB_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 32| INNODB_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 33| INNODB_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 34| INNODB_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 35| INNODB_VIRTUAL | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 36| INNODB_CACHED_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 37| INNODB_SESSION_TEMP_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | 38| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | 39| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | 40| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL | 41| TempTable | ACTIVE | STORAGE ENGINE | NULL | GPL | 42| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL | 43| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL | 44| ndbcluster | DISABLED | STORAGE ENGINE | NULL | GPL | 45| ndbinfo | DISABLED | STORAGE ENGINE | NULL | GPL | 46| ndb_transid_mysql_connection_map | DISABLED | INFORMATION SCHEMA | NULL | GPL | 47| ngram | ACTIVE | FTPARSER | NULL | GPL | 48| mysqlx_cache_cleaner | ACTIVE | AUDIT | NULL | GPL | 49| mysqlx | ACTIVE | DAEMON | NULL | GPL | 50+----------------------------------+----------+--------------------+---------+---------+ 5145 rows in set (0.00 sec)
또한 SHOW ENGINES의 출력 결과를 확인하여, Engine 컬럼에 ndbinfo가, Support 컬럼에 YES가 포함된 라인이 있는지 점검하는 방법으로도 수행할 수 있습니다. 다음 예와 같습니다(강조된 텍스트):
1mysql> SHOW ENGINES\G 2*************************** 1. row *************************** 3 Engine: MEMORY 4 Support: YES 5 Comment: Hash based, stored in memory, useful for temporary tables 6Transactions: NO 7 XA: NO 8 Savepoints: NO 9*************************** 2. row *************************** 10 Engine: InnoDB 11 Support: DEFAULT 12 Comment: Supports transactions, row-level locking, and foreign keys 13Transactions: YES 14 XA: YES 15 Savepoints: YES 16*************************** 3. row *************************** 17 Engine: PERFORMANCE_SCHEMA 18 Support: YES 19 Comment: Performance Schema 20Transactions: NO 21 XA: NO 22 Savepoints: NO 23*************************** 4. row *************************** 24 Engine: MyISAM 25 Support: YES 26 Comment: MyISAM storage engine 27Transactions: NO 28 XA: NO 29 Savepoints: NO 30*************************** 5. row *************************** 31 Engine: ndbinfo 32 Support: YES 33 Comment: MySQL Cluster system information storage engine 34Transactions: NO 35 XA: NO 36 Savepoints: NO 37*************************** 6. row *************************** 38 Engine: MRG_MYISAM 39 Support: YES 40 Comment: Collection of identical MyISAM tables 41Transactions: NO 42 XA: NO 43 Savepoints: NO 44*************************** 7. row *************************** 45 Engine: BLACKHOLE 46 Support: YES 47 Comment: /dev/null storage engine (anything you write to it disappears) 48Transactions: NO 49 XA: NO 50 Savepoints: NO 51*************************** 8. row *************************** 52 Engine: CSV 53 Support: YES 54 Comment: CSV storage engine 55Transactions: NO 56 XA: NO 57 Savepoints: NO 58*************************** 9. row *************************** 59 Engine: ARCHIVE 60 Support: YES 61 Comment: Archive storage engine 62Transactions: NO 63 XA: NO 64 Savepoints: NO 65*************************** 10. row *************************** 66 Engine: ndbcluster 67 Support: YES 68 Comment: Clustered, fault-tolerant tables 69Transactions: YES 70 XA: NO 71 Savepoints: NO 7210 rows in set (0.01 sec)
ndbinfo 지원이 활성화되어 있다면, mysql이나 다른 MySQL 클라이언트에서 SQL 문을 사용하여 ndbinfo에 접근할 수 있습니다.
예를 들어, SHOW DATABASES의 출력에 ndbinfo가 다음과 같이 표시됩니다(강조된 텍스트):
1mysql> SHOW DATABASES; 2+--------------------+ 3| Database | 4+--------------------+ 5| information_schema | 6| mysql | 7| ndbinfo | 8| performance_schema | 9| sys | 10+--------------------+ 115 rows in set (0.04 sec)
만약 mysqld 프로세스가 --ndbcluster 옵션 없이 시작되었다면, ndbinfo는 사용 불가능하며 SHOW DATABASES에 의해 표시되지 않습니다.
mysqld가 이전에 NDB Cluster에 연결되어 있었으나, 클러스터 셧다운, 네트워크 연결 손실 등과 같은 이벤트로 인해 클러스터를 사용할 수 없게 되는 경우, ndbinfo와 그 테이블들은 계속 표시되지만, (blocks 또는 config_params를 제외한) 어떤 테이블에 접근을 시도하더라도 NDBINFO로부터 Got error 157 'Connection to NDB failed' 오류가 발생하여 실패합니다.
blocks 및 config_params 테이블을 제외하면, 여기서 ndbinfo “테이블”이라고 부르는 것들은 실제로는 MySQL Server에 보통은 보이지 않는 내부 NDB 테이블로부터 생성된 뷰입니다. ndbinfo_show_hidden 시스템 변수를 ON(또는 1)으로 설정하면 이 테이블들을 보이게 할 수 있지만, 일반적으로는 필요하지 않습니다.
모든 ndbinfo 테이블은 읽기 전용이며, 조회될 때마다 필요에 따라 동적으로 생성됩니다. 이들 중 다수는 데이터 노드에 의해 병렬로 생성되는 반면, 일부는 특정 SQL 노드에 특화되어 있기 때문에, 일관된 스냅샷을 제공한다는 보장은 없습니다.
또한 조인 푸시다운은 ndbinfo 테이블에서 지원되지 않습니다. 따라서 큰 ndbinfo 테이블 간의 조인은, 쿼리가 WHERE 절을 사용하더라도, 요청한 API 노드로 대량의 데이터를 전송해야 할 수 있습니다.
ndbinfo 테이블은 쿼리 캐시에 포함되지 않습니다. (Bug #59831)
USE 문으로 ndbinfo 데이터베이스를 선택한 다음, SHOW TABLES 문을 실행하여 다른 데이터베이스와 마찬가지로 테이블 목록을 얻을 수 있습니다. 예는 다음과 같습니다:
1mysql> USE ndbinfo; 2Database changed 3 4mysql> SHOW TABLES; 5+---------------------------------+ 6| Tables_in_ndbinfo | 7+---------------------------------+ 8| arbitrator_validity_detail | 9| arbitrator_validity_summary | 10| backup_id | 11| blobs | 12| blocks | 13| certificates | 14| cluster_locks | 15| cluster_operations | 16| cluster_transactions | 17| config_nodes | 18| config_params | 19| config_values | 20| counters | 21| cpudata | 22| cpudata_1sec | 23| cpudata_20sec | 24| cpudata_50ms | 25| cpuinfo | 26| cpustat | 27| cpustat_1sec | 28| cpustat_20sec | 29| cpustat_50ms | 30| dict_obj_info | 31| dict_obj_tree | 32| dict_obj_types | 33| dictionary_columns | 34| dictionary_tables | 35| disk_write_speed_aggregate | 36| disk_write_speed_aggregate_node | 37| disk_write_speed_base | 38| diskpagebuffer | 39| diskstat | 40| diskstats_1sec | 41| error_messages | 42| events | 43| files | 44| foreign_keys | 45| hash_maps | 46| hwinfo | 47| index_columns | 48| index_stats | 49| locks_per_fragment | 50| logbuffers | 51| logspaces | 52| membership | 53| memory_per_fragment | 54| memoryusage | 55| nodes | 56| operations_per_fragment | 57| pgman_time_track_stats | 58| processes | 59| resources | 60| restart_info | 61| server_locks | 62| server_operations | 63| server_transactions | 64| table_distribution_status | 65| table_fragments | 66| table_info | 67| table_replicas | 68| tc_time_track_stats | 69| threadblocks | 70| threads | 71| threadstat | 72| transporter_details | 73| transporters | 74+---------------------------------+ 7566 rows in set (0.00 sec)
모든 ndbinfo 테이블은 NDB 스토리지 엔진을 사용합니다. 그럼에도 불구하고, ndbinfo 엔트리는 앞에서 설명한 대로 SHOW ENGINES와 SHOW PLUGINS의 출력에 계속 나타납니다.
이러한 테이블에 대해서는, 일반적인 경우와 마찬가지로 SELECT 문을 실행할 수 있습니다:
1mysql> SELECT * FROM memoryusage; 2+---------+---------------------+--------+------------+------------+-------------+ 3| node_id | memory_type | used | used_pages | total | total_pages | 4+---------+---------------------+--------+------------+------------+-------------+ 5| 5 | Data memory | 425984 | 13 | 2147483648 | 65536 | 6| 5 | Long message buffer | 393216 | 1536 | 67108864 | 262144 | 7| 6 | Data memory | 425984 | 13 | 2147483648 | 65536 | 8| 6 | Long message buffer | 393216 | 1536 | 67108864 | 262144 | 9| 7 | Data memory | 425984 | 13 | 2147483648 | 65536 | 10| 7 | Long message buffer | 393216 | 1536 | 67108864 | 262144 | 11| 8 | Data memory | 425984 | 13 | 2147483648 | 65536 | 12| 8 | Long message buffer | 393216 | 1536 | 67108864 | 262144 | 13+---------+---------------------+--------+------------+------------+-------------+ 148 rows in set (0.09 sec)
다음 두 개의 SELECT 문이 memoryusage 테이블을 사용하는 것처럼, 이보다 더 복잡한 쿼리도 가능합니다:
1mysql> 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+-----------------------------+ 91 row in set (0.09 sec) 10 11mysql> SELECT SUM(used) as 'Long Message Buffer, All Nodes' 12 > FROM memoryusage 13 > WHERE memory_type = 'Long message buffer'; 14+-------------------------------------+ 15| Long Message Buffer Used, All Nodes | 16+-------------------------------------+ 17| 1179648 | 18+-------------------------------------+ 191 row in set (0.08 sec)
ndbinfo 테이블 및 컬럼 이름은 (ndbinfo 데이터베이스 이름 자체와 마찬가지로) 대소문자를 구분합니다. 이러한 식별자는 모두 소문자입니다. 잘못된 대소문자를 사용하면, 다음 예에서처럼 오류가 발생합니다:
1mysql> SELECT * FROM nodes; 2+---------+--------+---------+-------------+-------------------+ 3| node_id | uptime | status | start_phase | config_generation | 4+---------+--------+---------+-------------+-------------------+ 5| 5 | 17707 | STARTED | 0 | 1 | 6| 6 | 17706 | STARTED | 0 | 1 | 7| 7 | 17705 | STARTED | 0 | 1 | 8| 8 | 17704 | STARTED | 0 | 1 | 9+---------+--------+---------+-------------+-------------------+ 104 rows in set (0.06 sec) 11 12mysql> SELECT * FROM Nodes; 13ERROR 1146 (42S02): Table 'ndbinfo.Nodes' doesn't exist
mysqldump는 ndbinfo 데이터베이스를 전적으로 무시하며, 어떤 출력에서도 이를 제외합니다. 이는 --databases 또는 --all-databases 옵션을 사용하는 경우에도 마찬가지입니다.
NDB Cluster는 또한 INFORMATION_SCHEMA 정보 데이터베이스 내의 테이블도 유지 관리합니다. 여기에는 NDB Cluster Disk Data 스토리지에 사용되는 파일에 대한 정보를 포함하는 FILES 테이블과, 트랜잭션, 트랜잭션 코디네이터 및 NDB Cluster API 노드 간의 관계를 보여 주는 ndb_transid_mysql_connection_map 테이블이 포함됩니다. 자세한 내용은 해당 테이블에 대한 설명이나 Section 25.6.16, “INFORMATION_SCHEMA Tables for NDB Cluster”을 참조하십시오.
25.6.14 NDB API Statistics Counters and Variables
25.6.16 INFORMATION_SCHEMA Tables for NDB Cluster