Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Performance & Tuning >> count(*) and count(1)

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: count(*) and count(1)
 Thunderchicken  Posted: Dec 26, 2002 04:12:00 PM

 Total Post: 1
 Joined: Jan, 2003






 Hi All,
Is there any performance issues when running a select count (*) instead of select count (1) or select count (rowid) statement?

Thanks,
Miller


 tonny_2003
Posted: Dec 26, 2002 04:17:00 PM  

 Total Post: 6
 Joined: Jan, 2003






 
I think count (*) will be a full table scan irrespective of the indexes present on
the table whereas Count (1) will only scan the index space provided the column1 is indexed. So count (1) should be faster since less bytes will be read.
Thanks,
Vimal


 vasu
Posted: Dec 26, 2002 04:27:00 PM  

 Total Post: 50
 Joined: Jan, 2003






 
Probably count(*) is less performing than count(1).

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi242
  neeraj sharma228
  Ramesh Jois226
  Bishal Khetan169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software