Try OpenEdge Now
skip to main content
OpenEdge 11.6.3 New Information : OpenEdge SQL
 

OpenEdge SQL

Release 11.6.3 of OpenEdge SQL includes support for specifying a specific tenant or tenants in the UPDATE STATISTICS statement.
Update Statistics for Multi-tenant table by tenant
The UPDATE STATISTICS statement collects statistics for specific tenant or tenants when executed for a Multi-tenant table. This reduces the time taken to collect the statistics for specific tenants instead of collecting statistics for all the tenants at once. The updated syntax is as follows:

Syntax

UPDATE
[ TABLE | INDEX |[ ALL ] COLUMN ] STATISTICS [ AND ] ...
[ FOR table_name
[[ FOR PARTITIONS partition_name_1 [ , partition_name_n, ...]]
|
[FOR TENANTS tenant1 [ , tenant2,...]] ];
Notes
*The FOR TENANTS and FOR PARTITIONS clauses are mutually exclusive.
*The FOR TENANTS clause can be used with multi-tenant tables to create statistics for only the specified tenants in the tenants list. When this clause is not used, statistics are created for all tenants.
*The tenant specified in the FOR TENANTS clause should not be a super-tenant.
The following example demonstrates updating index statistics of one table for two tenants:
UPDATE INDEX STATISTICS FOR table_name FOR TENANTS tenant1, tenant2;
For more information on UPDATE STATISTICS, see OpenEdge Data Management: SQL Reference.