[+/-]
ndbinfo arbitrator_validity_detail
Tablendbinfo arbitrator_validity_summary
Tablendbinfo blocks
Tablendbinfo cluster_operations
Tablendbinfo cluster_transactions
Tablendbinfo config_params
Tablendbinfo counters
Tablendbinfo diskpagebuffer
Tablendbinfo logbuffers
Tablendbinfo logspaces
Tablendbinfo membership
Tablendbinfo memoryusage
Tablendbinfo nodes
Tablendbinfo pools
Tablendbinfo resources
Tablendbinfo server_operations
Tablendbinfo server_transactions
Tablendbinfo threadblocks
Tablendbinfo threadstat
Tablendbinfo transporters
Table
ndbinfo
is a database storing containing
information specific to MySQL Cluster, available beginning with
MySQL Cluster NDB 7.1.1.
This database contains a number of tables, each providing a different sort of data about MySQL 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 MySQL 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):
mysql> SHOW PLUGINS;
+------------+----------+----------------+---------+---------+
| Name | Status | Type | Library | License |
+------------+----------+----------------+---------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| ndbcluster | ACTIVE | STORAGE ENGINE | NULL | GPL |
| ndbinfo | ACTIVE | STORAGE ENGINE | NULL | GPL |
+------------+----------+----------------+---------+---------+
12 rows in set (0.00 sec)
You can also do this by checking the output of
SHOW ENGINES
for a row that has
ndbinfo
for Engine
and
YES
for Support
, as shown
here (emphasized text):
mysql> SHOW ENGINES\G
*************************** 1. row ***************************
Engine: ndbcluster
Support: YES
Comment: Clustered, fault-tolerant tables
Transactions: YES
XA: NO
Savepoints: NO
*************************** 2. row ***************************
Engine: MRG_MYISAM
Support: YES
Comment: Collection of identical MyISAM tables
Transactions: NO
XA: NO
Savepoints: NO
*************************** 3. row ***************************
Engine: ndbinfo
Support: YES
Comment: MySQL Cluster system information storage engine
Transactions: NO
XA: NO
Savepoints: NO
*************************** 4. row ***************************
Engine: CSV
Support: YES
Comment: CSV storage engine
Transactions: NO
XA: NO
Savepoints: NO
*************************** 5. row ***************************
Engine: MEMORY
Support: YES
Comment: Hash based, stored in memory, useful for temporary tables
Transactions: NO
XA: NO
Savepoints: NO
*************************** 6. row ***************************
Engine: FEDERATED
Support: NO
Comment: Federated MySQL storage engine
Transactions: NULL
XA: NULL
Savepoints: NULL
*************************** 7. row ***************************
Engine: ARCHIVE
Support: YES
Comment: Archive storage engine
Transactions: NO
XA: NO
Savepoints: NO
*************************** 8. row ***************************
Engine: InnoDB
Support: YES
Comment: Supports transactions, row-level locking, and foreign keys
Transactions: YES
XA: YES
Savepoints: YES
*************************** 9. row ***************************
Engine: MyISAM
Support: DEFAULT
Comment: Default engine as of MySQL 3.23 with great performance
Transactions: NO
XA: NO
Savepoints: NO
*************************** 10. row ***************************
Engine: BLACKHOLE
Support: YES
Comment: /dev/null storage engine (anything you write to it disappears)
Transactions: NO
XA: NO
Savepoints: NO
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:
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ndbinfo |
| test |
+--------------------+
4 rows in set (0.00 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 a MySQL
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.
Beginning with MySQL Cluster NDB 7.0.22 and MySQL Cluster NDB
7.1.11, 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:
mysql>USE ndbinfo;
Database changed mysql>SHOW TABLES;
+----------------------+ | Tables_in_ndbinfo | +----------------------+ | blocks | | cluster_operations | | cluster_transactions | | config_params | | counters | | diskpagebuffer | | logbuffers | | logspaces | | memoryusage | | nodes | | resources | | server_operations | | server_transactions | | threadblocks | | threadstat | | transporters | +----------------------+ 16 rows in set (0.04 sec)
The diskpagebuffer
table was
added in MySQL Cluster NDB 7.1.9.
The cluster_operations
,
cluster_transactions
,
server_operations
,
server_transactions
,
threadblocks
, and
threadstat
tables were added in
MySQL Cluster NDB 7.1.17.
In early versions of MySQL Cluster NDB 7.1, there was an
additional pools
table in the
ndbinfo
database; however, this table was
removed in MySQL Cluster NDB 7.1.3.
You can execute SELECT
statements
against these tables, just as you would normally expect:
mysql> SELECT * FROM memoryusage;
+---------+--------------+------+-------+
| node_id | memory_type | used | max |
+---------+--------------+------+-------+
| 1 | Data memory | 3230 | 6408 |
| 2 | Data memory | 3230 | 6408 |
| 1 | Index memory | 16 | 12832 |
| 2 | Index memory | 16 | 12832 |
+---------+--------------+------+-------+
4 rows in set (0.37 sec)
More complex queries, such as the two following
SELECT
statements using the
memoryusage
table, are possible:
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
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:
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 exist
Beginning with MySQL Cluster NDB 7.1.7,
mysqldump ignores ndbinfo
entirely, and excludes it from any output. This is true even when
using the --databases
or
--all-databases
option.
MySQL Cluster also maintains tables in the
INFORMATION_SCHEMA
information database,
including the FILES
table which
contains information about files used for MySQL Cluster Disk Data
storage. For more information, see
Section 20.26, “INFORMATION_SCHEMA
Tables for MySQL Cluster”.
User Comments
Add your own comment.