|
|
|
|
|
|
|
|
Re: What is the difference between these 2 queries [message #295792 is a reply to message #293405] |
Wed, 23 January 2008 08:06   |
ramanajv1968
Messages: 168 Registered: December 2005 Location: HYDERABAD
|
Senior Member |
|
|
In the Earlier releases(since you are not mentioned your version)
Since the COUNT function will return the same
results regardless of what NOT NULL field(s)
you include as the COUNT function parameters (ie: within the brackets), you can change the syntax of the COUNT
function to COUNT(1) to get better performance as
the database engine will not have to fetch back
the data fields.
[Updated on: Wed, 23 January 2008 08:15] by Moderator Report message to a moderator
|
|
|
Re: What is the difference between these 2 queries [message #295793 is a reply to message #295792] |
Wed, 23 January 2008 08:16  |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | you can change the syntax of the COUNT
function to COUNT(1) to get better performance as
the database engine will not have to fetch back
the data fields.
|
This is plain WRONG.
Oracle does not have to fetch anything to count.
Actually count(1) is internally replaced by count(*).
Regards
Michel
|
|
|