This is a Perl script that can be used to estimate the amount of
space that would be required by a MySQL database if it were
converted to use the
storage engine. Unlike the other utilities discussed in this
section, it does not require access to a MySQL Cluster (in fact,
there is no reason for it to do so). However, it does need to
access the MySQL server on which the database to be tested
A running MySQL server. The server instance does not have to provide support for MySQL Cluster.
A working installation of Perl.
HTML::Template modules, both of which can
be obtained from CPAN if they are not already part of your
Perl installation. (Many Linux and other operating system
distributions provide their own packages for one or both of
ndb_size.tmpl template file, which
you should be able to find in the
share/mysql directory of your MySQL
installation. This file should be copied or moved into the
same directory as
it is not there already—before running the script.
A MySQL user account having the necessary privileges. If you
do not wish to use an existing account, then creating one
GRANT USAGE ON
db_name is the name of the
database to be examined—is sufficient for this
ndb_size.tmpl can also be found in the
MySQL sources in
The command shown connects to the MySQL server at
hostname using the account of the
username having the password
password, analyzes all of the tables
db_name, and generates a
report in HTML format which is directed to the file
(Without the redirection, the output is sent to
The output from this script includes the following information:
Minimum values for the
MaxNoOfTriggers configuration parameters
required to accommodate the tables analyzed.
Memory requirements for all of the tables, attributes, ordered indexes, and unique hash indexes defined in the database.
DataMemory required per table and table