Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 17 Nov 2004 @ 12:26:25 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: COLLECT STATISTICS from macro
 
From:   ulrich arndt

basic thoughts on this.

Macros are defining an implicit transaction. Therefore any DDL statement like create, alter, drop are difficult as they lock the dbc tables which can not be allowed for long periods. Collect stats is also writing into DBC tables and follow the same rule - do not allow any process to lock the related DBC tables any longer than is needed to to the update (or insert) of the stats information.

I have something in my mind that it is possible to call a stats (or DDL) in a macro as long as it is the last statement of the macro. If this is still true your only chance would be to have several different macros:

1. populate temp tables

2. collect stats on table 1

3. collect stats on table 2

4. collect stats on table 3

5. process further


Unfortunately you can not define a single macro which is doing the whole job.

Stored procedures might be able to help here.

You can contact me directly in case you like more thoughts on this.


Ulrich



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023