Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 28 Aug 2009 @ 10:21:18 GMT


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


Subj:   Re: Parsing of SQL in teradata
 
From:   Dieter Noeth

Rahul Shashidhar Phadnis wrote:

  My question was exactly that when I write a sql (before I actually do the explain),do I need to worry about the order of where and join clauses ? Or anyhow I put it the teradata v2r6 optimizer is 'smart' enough to give me a low cost way of executing the same?  


Pre-TD12 the optimizer will evaluate WHERE-conditions on a single table based on the order of conditions.

The bad thing: there is no fixed order, it might choose left-to-right or right-to-left. You have to check explain to see the order.

For joins there shoud be no difference in explain when you change the order (unless there are outer joins, but this might return different result sets)


Dieter



     
  <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