SQL/MX Comparison Guide for SQL/MP Users
Optimizer and Executor
HP NonStop SQL/MX Comparison Guide for SQL/MP Users—523735-003
5-9
Statistics
Statistics
In NonStop SQL/MP, the UPDATE STATISTICS statement updates the statistics stored
in the catalog for the specified table. In NonStop SQL/MX, the UPDATE STATISTICS
statement updates the histogram statistics for a group of columns within a table.
NonStop SQL/MX provides a method for generating histograms that shows how data is
distributed for a column within a table. The purpose of generating these statistics is to
enable the optimizer to create more efficient data query execution plans.
When generating a histogram for a table, NonStop SQL/MX divides the range of
specified column values of the table into some number of intervals, distributing the
rows evenly within these intervals. It computes statistics associated with each interval
and uses the statistics to devise optimized plans.
For further information, see the UPDATE STATISTICS Statement and User Metadata
(UMD)—Histogram Tables entries in the SQL/MX Reference Manual. The SQL/MX
Query Guide contains a section on keeping statistics current and best practices to
follow with respect to statistics.