NDB_INDEX_STAT(1)

NAME
ndb_index_stat - NDB index statistics utility

SYNOPSIS

ndb_index_stat options

DESCRIPTION

ndb_index_stat ...
        Usage
      .PP To obtain basic index statistics about a given NDB table, invoke ndb_index_stat as shown here, with the name of the table as the first argument and the name of the database containing this table specified immediately following it, using the --database (-d) option:

    ndb_index_stat table -d database

In this example, we use ndb_index_stat to obtain such information about an NDB table named mytable in the test database:

    shell> ndb_index_stat -d test mytable
    table:mytable index:PRIMARY fragCount:4
    sampleVersion:2 loadTime:1336751773 sampleCount:0 keyBytes:0
    query cache: valid:1 sampleCount:0 totalBytes:0
    times in ms: save: 12.380 sort: 0.001
    NDBT_ProgramExit: 0 - OK

The --verbose option provides some additional output, as shown here:

    shell> ndb_index_stat -d test mytable --verbose
    random seed 1337010518
    connected
    loop 1 of 1
    table:mytable index:PRIMARY fragCount:4
    sampleVersion:2 loadTime:1336751773 sampleCount:0 keyBytes:0
    read stats
    query cache created
    query cache: valid:1 sampleCount:0 totalBytes:0
    times in ms: save: 20.766 sort: 0.001
    disconnected
    NDBT_ProgramExit: 0 - OK
    shell>

        Options
      .PP The following table includes options that are specific to the MySQL Cluster ndb_index_stat utility. Additional descriptions are listed following the table. For options common to all MySQL Cluster programs, see Options Common to MySQL Cluster Programs(1).

ndb_index_stat statistics options. The following options are used to generate index statistics. They work with a given table and database. They cannot be mixed with ndb_index_stat system options.

    • --database=name, -d name

    The name of the database that contains the table being queried.

    • --delete

    Delete the index statistics for the given table, stopping any auto-update that was previously configured.

    • --update

    Update the index statistics for the given table, and restart any auto-update that previously configured.

    • --dump

    Dump the contents of the query cache.

    • --query=#

    Perform random range queries on first key attribute (must be int unsigned).

ndb_index_stat system options. The following options are used to generate and update the statistics tables in the NDB kernel. They cannot be mixed with ndb_index_stat statistics options.

    • --sys-drop

    Drop all statistics tables and events in the NDB kernel. This causes all statistics to be lost.

    • --sys-create

    Create all statistics tables and events in the NDB kernel. This works only if none of them exist previously.

    • sys-create-if-not-exist

    Create any NDB system statistics tables or events (or both) that do not already exist when the program is invoked.

    • --sys-create-if-not-valid

    Create any NDB system statistics tables or events that do not already exist, after dropping any that are invalid.

    • --sys-check

    Verify that all required system statistics tables and events exist in the NDB kernel.

    • --sys-skip-tables

    Do not apply any --sys-* options to any statistics tables.

    • --sys-skip-events

    Do not apply any --sys-* options to any events.

    • --verbose

    Turn on verbose output.

    • --loops=#

    Repeat commands this number of times (for use in testing).

COPYRIGHT

Copyright © 1997, 2012, Oracle and/or its affiliates. All rights reserved.

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.

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.

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/.

SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/.

AUTHOR
Oracle Corporation (http://dev.mysql.com/).