count(*)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orajit
    New Member
    • Nov 2007
    • 75

    count(*)

    I am using Oracle 10g

    I am executing select count(*) from emp ;

    Emp table has millions of rows .

    Could you please tell me which option is better.

    Select count(1) from emp;
    or
    Select count(*) from emp;

    And Why ...
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Did you test and checked the outcome?

    Comment

    • orajit
      New Member
      • Nov 2007
      • 75

      #3
      ya ..it gives me same result ..but i am asking about performance ..which one is better count(*) or count(1)..

      Please advice...

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        There is no difference in the performance if you are using version 8 onwards.

        Comment

        Working...