Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 31 Jan 2007 @ 15:49:29 GMT


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


Subj:   Gathering statistics within a transaction
 
From:   ian.mcguinness

Hi,

Does anyone have any solutions for gathering table stats within a transaction? Our procedures change regularly make significant changes to the content of tables and then use these tables in later queries within that procedure. But the only way we've managed to avoid getting the "Only an ET or null statement is legal after a DDL Statement" error is to collect the stats, end the current transaction and then start a new transaction. Obviously this isn't great as if the proc fails it'll only roll back to the last end transaction.

We are porting over a couple of hundred procedures from SQL Server to Teradata so re-writing them all so that we update these tables in one procedure and collect stats at the end of it and then use them in other procedure isn't an option for us.

Any help or thoughts would be greatly appreciated.

Ian



     
  <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