Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 21 May 2009 @ 14:47:37 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Column Order in Derived Table
From:   Goli, Srikanth

Hi -

Does Teradata optimizer need the select columns in a subquery to create a derived table to be in a specific order?

Assume the following -

     SEL ....
     FROM A
     Join (Sel  
             From B
             Where ..
     ON A.Col1 = B.Col1

Does it use the first column in the derived table B as the PI OR does the optimizer understand that regardless of location of B.Col1, that needs to be driver for distribution / hashing? I understand that with standalone "Create Tables As", this is a factor and that first column either be the PI column, or PI be explicitly specified. But with a derived table, where optimizer has access to statistics and query, does it still need the user specify the order?


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