Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 07 Feb 2011 @ 19:19:56 GMT


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


Subj:   Re: Which query will be faster ?
 
From:   DWellman

Hi,

From (I think) TD 13 onwards #2 will be quickest as it doesn't read every row. TD will answer this query using the cylinder index structure. Physically smaller, fewer io's so faster.

#1 will be slowest.

I think #3 and #4 will be about the same because the plan will be the same. In both cases the AMP/file system basically says "you only want 'n' rows", I'll stop when I've returned that number". Have you tried checking the explain plan for these two ?

All of the above assumes of course that you're not talking about a small table :-)


Cheers,

Dave

Ward Analytics Ltd: Information in motion (www.ward-analytics.com)



     
  <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