|
|
UPDATE STATISTICS
Updates the statistics recorded for all tables in the database, a specified list of tables or all the tables belonging to the schemas owned by a specified list of idents.
Usage
Embedded/Interactive/ODBC/JDBC.
Description
The default operation is to update statistics for all tables, including data dictionary tables, in the database.
It is possible to update statistics for a specified list of tables by using the
FOR TABLEoption or for all the tables belonging to the schemas created by a specified list of idents by using theFOR IDENToption.Update statistics includes an automatic operation which ensures the consistency of secondary indexes (both explicitly created indexes and those created by the system when certain constraints are defined). The operation is transparent to users of the database and is performed on indexes selected by the
UPDATE STATISTICSstatement that are contained in a databank with theTRANSACTIONorLOGoption and which are flagged as `not consistent'.The process of ensuring the consistency of an index, and updating statistics for all tables in the database (the default operation), can be rather time-consuming. Therefore, it is generally recommended that these operations be performed in batch mode and at off-peak times, refer to the Mimer SQL System Management Handbook, Database Statistics for more information.
A secondary index is flagged as
not consistentif it is contained in a databank with theWORKoption or if the databank containing it has been upgraded from Mimer SQL version 7 or 8.1.The
IS_CONSISTENTcolumn in the data dictionary tableTABLE_CONSTRAINTSshows which indexes in the database are flagged asnot consistent.Restrictions
The current ident must be the creator of all the tables involved or must have
STATISTICSprivilege.Notes
The
UPDATE STATISTICSstatement can be used concurrently with other SQL statements.Example
UPDATE STATISTICS FOR IDENT joe;For more information, see the Mimer SQL System Management Handbook, Database Statistics.
Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|