Neoview SQL Reference Manual (R2.5)
UPDATE STATISTICS Statement
NOTE: HP recommends that you update statistics by using the automated UPDATE
STATISTICS stored procedures. The syntax for UPDATE STATISTICS is included here for
reference. For information about automated UPDATE STATISTICS, see the Neoview Database
Administrator's Guide.
• “Syntax Description of UPDATE STATISTICS”
• “Considerations for UPDATE STATISTICS”
• “Examples of UPDATE STATISTICS”
The UPDATE STATISTICS statement updates the histogram statistics for one or more groups of
columns within a table. These statistics are used to devise optimized access plans.
In addition to histogram statistics, UPDATE STATISTICS generates physical statistics (index
level, nonempty block count, and EOF) for Neoview SQL tables.
UPDATE STATISTICS is a Neoview SQL extension.
UPDATE STATISTICS FOR TABLE table [CLEAR
| on-clause
| [CREATE SAMPLE persistent-sample-option]
| [REMOVE SAMPLE persistent sample-option]]
on-clause is:
ON column-group-list CLEAR
| ON column-group-list [histogram-option]
column-group-list is:
column-list [,column-list]...
| EVERY COLUMN [,column-list]...
| EVERY KEY [,column-list]...
| EXISTING COLUMN[S] [,column-list]...
| NECESSARY COLUMN[S] [,column-list]...
column-list for a single-column group is:
column-name
| (column-name)
| column-name TO column-name
| (column-name) TO (column-name)
| column-name TO (column-name)
| (column-name) TO column-name
column-list for a multicolumn group is:
(column-name, column-name [,column-name]...)
histogram-option is:
GENERATE n INTERVALS
| SAMPLE [sample-option]
sample-option is:
[r ROWS]
| RANDOM percent PERCENT
| PERIODIC size ROWS EVERY period ROWS
persistent-sample-option is:
[r ROWS]
| ALL
| RANDOM percent PERCENT
204 SQL Statements