EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB18564: How to use the COLLECT STATISTICS syntax on global temporary table (GTT) against Teradata


Community Admin

• Strategy


Per Teradata documentation, the purpose of COLLECT STATISTICS is to collect demographic data for one or more columns of a base table, hash index, or join index, then compute a statistical profile of the collected data and store the synopsis in the data dictionary. Users can COLLECT STATISTICS against Teradata Global Temporary Table.
 
create global temporary table ZZMD00 (
Region_Id INTEGER,
DOLLARSALES FLOAT)
primary index (Region_Id)
on commit preserve rows
insert into ZZMD00
select a13.Region_Id Region_Id,
sum(a11.Order_Amt) DOLLARSALES
from ORDER_FACT a11,
LU_EMPLOYEE a12,
LU_CALL_CTR a13
where a11.Emp_Id = a12.Emp_Id and
a12.CALL_CTR_ID = a13.CALL_CTR_ID
group by a13.Region_Id
COLLECT STATISTICS ON TEMPORARY ZZMD00 INDEX (Region_Id)
To perform this, the Insert Post Statement 1 in VLDB property should be as follows:
COLLECT STATISTICS ON TEMPORARY ??? INDEX (!a)

ka04W000000OhP2QAK_0EM440000002JIG.gif

'???' and '!a' are wildcards
For more information about wildcards, refer to the following Strategy Knowledge Base technical note:
KB10940 (KB5200-800-0453): What SQL generation wildcards are implemented in Strategy Engine 9.x?
Third Party Software Installation:
WARNING: The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty, express, implied or otherwise, regarding this product, including its performance or reliability.


Comment

0 comments

Details

Knowledge Article

Published:

May 22, 2017

Last Updated:

May 22, 2017