Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 16 Nov 2010 @ 22:41:44 GMT


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


Subj:   Re: The use of * vs 1
 
From:   Dieter Noeth

Faible Mou wrote:

  Would I get any performance improvement if I change  


         > Select count(*) ...
  to  


         > Select count(1) ...

No.

Just don't do SUM(1), because this misses the new "count star" optimization in TD13.


  "if exist Select * from ..." vs "if exist Select 1 from ..."  


No, too.

This was true decades ago for some DBMSes, but nowadays it doesn't matter anymore.

In fact EXISTS is the only place where i recommend the usage of * to my students.


Dieter



     
  <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