Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 04 Sep 2009 @ 19:10:03 GMT


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


Subj:   Re: Volatile tables in macros
 
From:   Dempsey, Mike

I don't think you understand how Teradata works. No matter what order the rows are in when you send them to Teradata the database will store them in the order it wants to store them in - by hash value.

Even if you created a file that contained the rows in the order you want and loaded that file sequentially they would not be stored in the database sequentially. Storage order is irrelevant in Teradata - and also in relational database theory.

Unlike Oracle (and many other databases) it is not possible to 'position' to a row and read forward through 'consecutive' rows on disk ... they simply are not stored that way.

If you want the rows to be in a particular order when you extract them you must use an Order By on the Select statement. Otherwise they will be returned in (effectively) random order.


Mike Dempsey



     
  <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