Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 22 Jun 2005 @ 17:08:54 GMT


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


Subj:   Re: Sort before Join
 
From:   Duell, Bob

Brian asked:

  Is "sort before join" common to most/all database programs? Even in SAS, you have to sort the datasets before joining them.  


If by "SAS" you're referring to native SAS data sets, then sorting is *not necessarily* required before a join (in PROC SQL), a merge (in a DATA step), or BY-statement processing in a SAS procedure.

If your SAS data set has a relevant matching INDEX, the index will be used and sorting is not needed (and in fact, would defeat the purpose of a SAS index).

I can't say for sure, but I bet most databases work the same way: you only have to sort when an index does not exist.



     
  <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