Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Jan 2005 @ 11:42:15 GMT


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


Subj:   Re: Effect of ORDER BY in performance
 
From:   Victor Sokovin

  When I looked into the EXPLAIN of the query with and without ORDER BY, the estimated time is shown same with high confidence (as the stats are rightly available). I was expecting the query with ORDER BY to give a longer time that the one without ORDER BY.  


  Any reason, why it wasn't that way..?  


I think it depends on the number of rows returned. If the sort occurs at the end of the query execution (you should probably see it in the plan) on a relatively small number of rows in the spool file (if there is any intermediate spool file involved at all) then the sort time is negligible.


Regards,

Victor



     
  <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