Was this helpful?
COPY STATISTICS
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
The COPY STATISTICS statement copies in-memory statistics created by autostats (automatic statistics generation) into the system catalogs so that they are available after a restart.
This statement has the following formats:
COPY STATISTICS FOR table [(column-list)] {, table [(column-list)]} TO CATALOG
COPY STATISTICS FOR ALL TABLES TO CATALOG
COPY STATISTICS FOR ALL user TABLES TO CATALOG
table [(column-list)] {, table [(column-list)]}
Copies statistics for the specified tables or for only the specified columns in the tables.
user
Copies statistics for all tables owned by the specified user.
COPY STATISTICS Example
Copy the automatically generated statistics to catalog the columns orderstatus, totalprice, and orderdate in the orders table:
COPY STATISTICS FOR orders (orderstatus, totalprice, orderdate) TO CATALOG
Last modified date: 04/26/2024