 |
 |
Archives of the TeradataForum
Message Posted: Tue, 16 Nov 2010 @ 22:41:44 GMT
Subj: | | Re: The use of * vs 1 |
|
From: | | Dieter Noeth |
Faible Mou wrote:
| Would I get any performance improvement if I change | |
> Select count(*) ...
> 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
| |