Quantcast
Channel: Teradata Developer Exchange - Blog activity for carrie's blog
Viewing all articles
Browse latest Browse all 1058

New opportunities for statistics collection in Teradata 14.0 - comment by pinaldba

$
0
0

Hi Carrie,
 
Thanks for nice explanation. 
I have query related to Summary statistics for the staging tables.
Following steps are performed before loading data into final Model tables.

Step 1:- Loading data into Staging table 

 

CREATE SET TABLE staging.ABC ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      RECORD_TYPE CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC,

      ACCOUNT_NO INTEGER NOT NULL,

      PARENT_ID INTEGER,

      CHILD_COUNT INTEGER,

      HIERARCHY_ID INTEGER,

PRIMARY INDEX ( ACCOUNT_NO );

 

Step 2:- Collecting statistics on staging table - staging.ABC

 

Step 3:- Rename staging.ABC to staging.ABC_XYZ and then renamed table "staging.ABC_XYZ" will be further used will be in batch processing and in transafomration.

 

Step 4:- Re-create the staging table ipstaging.AR_A100 for next run.
Questions:- 
1). Does Teradata recommanded to collect stats after renaming the table staging.ABC_XYZ? if Answer is Yes, then I would like to know the reason for the same?
2). Does renaming the tables can drop Random Amp sample from summary statistics history as Table-id has been changed during staging process. Does optimizer may extrapulate wronly here as stats has been not refreshed after renaming the staging table ""staging.ABC_XYZ".
 
Thanks for your help in Advance and eagerly awaiting answer from you.
 
Regards
Pinal
 
 
 
 
 
 
 
 
 


Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>