Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 29 May 2012 @ 13:08:23 GMT

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

Subj:   Re: What is difference between Sample 10 and Top 10?
From:   bhanu.chintalapalli

Hi Sugesh,

TOP displays the first 10 rows in Sorted order from the table. The optimizer is free to select the cheapest plan it can find and stop processing as soon as it has found enough rows to return.

SAMPLE displays any 10 rows randomly from the table. Performance wise is better to use TOP.



  <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: 28 Jun 2020