2
.\" Title: \fBndb_desc\fR
3
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6
.\" Manual: MySQL Database System
10
.TH "\FBNDB_DESC\FR" "1" "04/12/2011" "MySQL 5\&.1" "MySQL Database System"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
23
ndb_desc \- describe NDB tables
25
.HP \w'\fBndb_desc\ \fR\fB\fIoptions\fR\fR\ 'u
26
\fBndb_desc \fR\fB\fIoptions\fR\fR
30
provides a detailed description of one or more
39
ndb_desc \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\-p]
47
MySQL table creation and population statements:
55
id INT(11) NOT NULL AUTO_INCREMENT,
56
name VARCHAR(20) NOT NULL,
57
length_mm INT(11) NOT NULL,
58
weight_gm INT(11) NOT NULL,
62
INSERT INTO fish VALUES
63
(\'\',\'guppy\', 35, 2), (\'\',\'tuna\', 2500, 150000),
64
(\'\',\'shark\', 3000, 110000), (\'\',\'manta ray\', 1500, 50000),
65
(\'\',\'grouper\', 900, 125000), (\'\',\'puffer\', 250, 2500);
78
shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR
86
Number of attributes: 4
87
Number of primary keys: 1
88
Length of frm data: 311
94
TableStatus: Retrieved
96
id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
97
name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY
98
length_mm Int NOT NULL AT=FIXED ST=MEMORY
99
weight_gm Int NOT NULL AT=FIXED ST=MEMORY
101
PRIMARY KEY(id) \- UniqueHashIndex
102
PRIMARY(id) \- OrderedIndex
103
uk$unique(name) \- UniqueHashIndex
104
uk(name) \- OrderedIndex
105
\-\- Per partition info \-\-
106
Partition Row count Commit count Frag fixed memory Frag varsized memory Extent_space Free extent_space
107
0 2 2 32768 32768 0 0
108
1 4 4 32768 32768 0 0
109
NDBT_ProgramExit: 0 \- OK
115
Information about multiple tables can be obtained in a single invocation of
117
by using their names, separated by spaces\&. All of the tables must be in the same database\&.
123
columns were added in MySQL Cluster NDB 6\&.3\&.27 and MySQL Cluster NDB 7\&.0\&.8\&. They are applicable only to
125
tables having columns on disk; for tables having only in\-memory columns, these columns always contain the value
128
To illustrate their use, we modify the previous example\&. First, we must create the necessary Disk Data objects, as shown here:
134
CREATE LOGFILE GROUP lg_1
135
ADD UNDOFILE \'undo_1\&.log\'
139
ALTER LOGFILE GROUP lg_1
140
ADD UNDOFILE \'undo_2\&.log\'
143
CREATE TABLESPACE ts_1
144
ADD DATAFILE \'data_1\&.dat\'
145
USE LOGFILE GROUP lg_1
148
ALTER TABLESPACE ts_1
149
ADD DATAFILE \'data_2\&.dat\'
157
(For more information on the statements just shown and the objects created by them, see
158
Section\ \&16.5.10.1, \(lqMySQL Cluster Disk Data Objects\(rq, as well as
159
Section\ \&12.1.14, \(lqCREATE LOGFILE GROUP Syntax\(rq, and
160
Section\ \&12.1.18, \(lqCREATE TABLESPACE Syntax\(rq\&.)
162
Now we can create and populate a version of the
164
table that stores 2 of its columns on disk (deleting the previous version of the table first, if it already exists):
171
id INT(11) NOT NULL AUTO_INCREMENT,
172
name VARCHAR(20) NOT NULL,
173
length_mm INT(11) NOT NULL,
174
weight_gm INT(11) NOT NULL,
177
) TABLESPACE ts_1 STORAGE DISK
179
INSERT INTO fish VALUES
180
(\'\',\'guppy\', 35, 2), (\'\',\'tuna\', 2500, 150000),
181
(\'\',\'shark\', 3000, 110000), (\'\',\'manta ray\', 1500, 50000),
182
(\'\',\'grouper\', 900, 125000), (\'\',\'puffer\', 250, 2500);
188
When run against this version of the table,
190
displays the following output:
196
shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR
204
Number of attributes: 4
205
Number of primary keys: 1
206
Length of frm data: 321
212
TableStatus: Retrieved
214
id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
215
name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY
216
length_mm Int NOT NULL AT=FIXED ST=DISK
217
weight_gm Int NOT NULL AT=FIXED ST=DISK
219
PRIMARY KEY(id) \- UniqueHashIndex
220
PRIMARY(id) \- OrderedIndex
221
uk$unique(name) \- UniqueHashIndex
222
uk(name) \- OrderedIndex
223
\-\- Per partition info \-\-
224
Partition Row count Commit count Frag fixed memory Frag varsized memory Extent_space Free extent_space
225
0 2 2 32768 32768 1048576 1044440
226
1 4 4 32768 32768 1048576 1044400
227
NDBT_ProgramExit: 0 \- OK
233
This means that 1048576 bytes are allocated from the tablespace for this table on each partition, of which 1044440 bytes remain free for additional storage\&. In other words, 1048576 \- 1044440 = 4136 bytes per partition is currently being used to store the data from this table\'s disk\-based columns\&. The number of bytes shown as
235
is available for storing on\-disk column data from the
237
table only; for this reason, it is not visible when selecting from the
238
INFORMATION_SCHEMA\&.FILES
250
.\" ndb_desc: extra-partition-info option
251
.\" extra-partition-info option: ndb_desc
252
\fB\-\-extra\-partition\-info\fR,
255
Print additional information about the table\'s partitions\&.
266
.\" ndb_desc: blob-info option
267
.\" blob-info option: ndb_desc
268
\fB\-\-blob\-info\fR,
271
Include information about subordinate
277
Use of this option also requires the use of the
278
\fB\-\-extra\-partition\-info\fR
279
(\fB\-p\fR) option\&.
281
This option was added in MySQL Cluster NDB 6\&.3\&.32, MySQL Cluster NDB 7\&.0\&.13, and MySQL Cluster NDB 7\&.1\&.2\&.
292
.\" ndb_desc: extra-node-info option
293
.\" extra-node-info option: ndb_desc
294
\fB\-\-extra\-node\-info\fR,
297
Include information about the mappings between table partitions and the data nodes upon which they reside\&. This information can be useful for verifying distribution awareness mechanisms and supporting more efficient application access to the data stored in MySQL Cluster\&.
299
Use of this option also requires the use of the
300
\fB\-\-extra\-partition\-info\fR
301
(\fB\-p\fR) option\&.
303
This option was added in MySQL Cluster NDB 6\&.2\&.19, MySQL Cluster NDB 6\&.3\&.33, MySQL Cluster NDB 7\&.0\&.14, and MySQL Cluster NDB 7\&.1\&.2\&.
308
Copyright \(co 1997, 2011, Oracle and/or its affiliates. All rights reserved.
310
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
312
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
314
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
317
For more information, please refer to the MySQL Reference Manual,
318
which may already be installed locally and which is also available
319
online at http://dev.mysql.com/doc/.
321
Oracle Corporation (http://dev.mysql.com/).