Updating Statistics

Description

With the UPDATE STATISTICS ON statement, you can generate internal statistics used by the query processor. Such statistics allow the database system to perform query optimization more efficiently.

Syntax

UPDATE STATISTICS ON { table_spec [ {, table_spec } ] | ALL CLASSES | CATALOG CLASSES } [ ; ]

table_spec :

single_table_spec

( single_table_spec [ {, single_table_spec } ] )

single_table_spec :

[ ONLY ] table_name

| ALL table_name [ ( EXCEPT table_name ) ]