Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 10 Jun 2004 @ 15:08:05 GMT


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


Subj:   Performance Improvement on this Query without Collecting Statistics
 
From:   Kambhoji, Naveen Ram Prasanna

Hi Group,

Is there any other way to improve Performance of the below query other than COLLECTING STATISTICS .....There are around 180 Million rows in DAILY_SPEND and 882 rows in DATE table....

     INSERT INTO BCWK_SPEND (BCWeekID, MarketID, MediaSubTypeID, DaypartCode, companyID,
              AdvertiserID, DistributorID, ProgramID, CreativeID, ClassificationID, AttributeID, Spend, Units)

     SELECT dt.BCWeekID, s.MarketID, s.MediaSubTypeID, s.DaypartCode, s.companyID,
            s.AdvertiserID, s.DistributorID, s.ProgramID, s.CreativeID, s.ClassificationID, s.AttributeID,
            SUM(s.Spend), SUM(s.Units)

     FROM DAILY_SPEND s
          JOIN DATE dt on dt.DateID = s.DateID

     GROUP BY dt.BCWeekID, s.MarketID, s.MediaSubTypeID, s.DaypartCode, s.companyID, s.AdvertiserID,
              s.DistributorID, s.ProgramID, s.CreativeID, s.ClassificationID, s.AttributeID;

Thanx!

Prasanna



     
  <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