Home » SQL & PL/SQL » SQL & PL/SQL » select count(1) (10G)
select count(1) [message #357512] Wed, 05 November 2008 12:52 Go to next message
Messages: 4
Registered: November 2008
Junior Member
My boss tells me that using select count(1) from a table runs faster than using select count(*) on the same table. He said select count(*) does a full table scan, which is not needed for a count. But I have always gotten the same run time length whichever one I run, even on a very large table. So is there really a difference?

Re: select count(1) [message #357515 is a reply to message #357512] Wed, 05 November 2008 13:02 Go to previous messageGo to next message
Michel Cadot
Messages: 65076
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
He is wrong and this has been discussed many times, so search.

Re: select count(1) [message #357517 is a reply to message #357512] Wed, 05 November 2008 13:06 Go to previous message
Messages: 327
Registered: March 2008
Location: India
Senior Member
Difference between COUNT(1) and COUNT(*)
This topic has been discussed in this forum also.

Hope the link helps,

Previous Topic: Package is in use?
Next Topic: Is there any way to store the value more then 32760 in a variable.
Goto Forum:

Current Time: Thu Jul 20 07:56:10 CDT 2017

Total time taken to generate the page: 0.07104 seconds