Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 26 Nov 2007 @ 23:53:42 GMT


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


Subj:   Re: Statistics in BT; ET;
 
From:   Christopher Stephens

Hi,

A COLLECT STATS command can't be issued with other commands inside of a transaction - it must be the only command issued inside a BT/ET in Teradata mode or before a COMMIT in ANSI mode.

That said, I'm sorry to hear you are not having much luck just loading [table 1] and [table 2] and running your query that performs a join using random-AMP sampled stats. In my experience, I've had to watch stats collection on staging or intermediate tables - while collecting stats may improve the generation of plans for joins that follow, it is expensive! Sometimes, it is more expensive to collect stats that it is to run the process without stats - check DBQL or AmpUsage to make sure ...

Is your "joining" query very complicated? Would you like us to take a look at the plan without stats, and offer suggestions?


- Chris


PS: Is it that important that the first two INSERTs roll back if something goes wrong downstream? If you really need something that will make this work, consider CHECKPOINTING a permanent journal ...



     
  <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