Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 13 Mar 2008 @ 12:53:40 GMT


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


Subj:   Retreive the records with minimal spool space
 
From:   vedamurthy.gy

Hi,

I need to retrieve only top 1000 (sales) records from a view. The total size of the view is 1.3 TB. When I tried this, it took more than 2 hour. But earlier the same query was taking only 10 minutes.

My query was

     1. sel top 1000 * from employee

OR

     2. sel * from employee
        qualify rank() over (order by employee_number) =1000;

Please let me know,why its taking so much of time and is there any alternative way to write a query to improve the performance.


Thanks

veda



     
  <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: 27 Dec 2016