SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

MXCI Commands
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
4-110
SHOWSTATS Command
SHOWSTATS Command
The SHOWSTATS command retrieves statistics from a column(s) of a table. You can
use MXCI or an embedded program to execute this command.
DETAIL
displays the detailed statistics, which includes the histogram ID, number of
intervals, total number of rows, total UEC, column names, and low and high values
for each interval.
EVERY KEY
displays the statistics for every column that is a key or a part of the key.
EVERY COLUMN
displays the statistics for every column in the table for which statistics are
available.
EXISTING COLUMN[S]
displays the statistics for every single column and multi-column group of the table
for which statistics are available.
column1 TO column2
displays the available statistics from column1 to column2 in the table .
Consideration for SHOWSTATS
If you have upgraded SQL/MX from an earlier version to 3.2 or later, HP recommends
that you run the UPDATE STATISTICS command before executing the SHOWSTATS
command. Otherwise, the display order for the column’s histogram might differ.
SHOWSTATS FOR TABLE tablename ON column-spec [DETAIL]
column-spec is:
| EVERY KEY [columnname,columnname...]
| EVERY COLUMN
| EXISTING COLUMN[S]
| column1 TO column2
| column-set
column-set is:
column-set-member [, column-set-member...]
column-set-member is:
columnname | multi-column-group
multi-column-group is: (columnname1, columnname2...)