Collect stats

Database
Enthusiast

Collect stats

Hi

  I have a requirement where I have to load like below,

Table A->intermediate table 1->intermediate table 2->table B

running above statements between BTET.have to collect stats after table1 loaded as well as table2 loaded.how we can achieve this.

2 REPLIES
Enthusiast

Re: Collect stats

If you can provide more details, then it will be easy, reasons, what is there in intermediate etc.. etc... You can refer to the link

http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1184_111A/Alte...

and I think it will answer most fo the questions. Also some of Carrie's blog  like

http://developer.teradata.com/blog/carrie/2012/08/new-opportunities-for-statistics-collection-in-ter...

Senior Apprentice

Re: Collect stats

COLLECT STATS is considered a DDL statement -> it can only be the final statement within a transaction.

So you can't collect stats after TableA was loaded.

Are you sure you need to run the load as a single transaction?