Skip to main content
Skip table of contents

STORAGE.TABLE_STATISTICS_ATTRIBUTES

Metadata_Start

Target database: Azure SQL Database, Azure Synapse SQL, Microsoft Fabric, Databricks SQL, Amazon Redshift

STORAGE.TABLE_STATISTICS_ATTRIBUTES is used to define attributes to be included in table statistics.


See also:


Usage

OPTION
STORAGE.TABLE_STATISTICS_ATTRIBUTES: sql_code

Notes

Table statistics can be created for tables and materialized views in supported target databases.


Examples

Azure SQL Database, Azure Synapse SQL, Microsoft Fabric:
Defining attributes to be included in table statistics

Example case:

Property

Value

Target entity

publish.F_TRIP

Statistics attributes

pulocationid, dolocationid

Attribute list defined as option value:

OPTION
STORAGE.TABLE_STATISTICS_ATTRIBUTES: pulocationid, dolocationid 

DDL generated by Agile Data Engine:

SQL
CREATE STATISTICS [ADE_PUBLISH_F_TRIP_STATS] ON [publish].[F_TRIP] (pulocationid, dolocationid);

Databricks SQL: Defining attributes to be included in table statistics

Requires the STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE parameter and will get triggered only in the entity recreation case

Example case:

Property

Value

Target entity

publish.F_TRIP

Statistics attributes

pulocationid, dolocationid

Attribute list defined as option value:

OPTION
STORAGE.TABLE_STATISTICS_ATTRIBUTES: pulocationid, dolocationid 

DDL generated by Agile Data Engine:

SQL
ANALYZE publish.F_TRIP COMPUTE STATISTICS FOR COLUMNS pulocationid, dolocationid;

Amazon Redshift: Defining attributes to be included in table statistics

Requires the STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE parameter and will get triggered only in the entity recreation case

Example case:

Property

Value

Target entity

publish.F_TRIP

Statistics attributes

pulocationid, dolocationid

Attribute list defined as option value:

OPTION
STORAGE.TABLE_STATISTICS_ATTRIBUTES: pulocationid, dolocationid 

DDL generated by Agile Data Engine:

SQL
ANALYZE publish.F_TRIP (pulocationid, dolocationid);

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.