what is count(*) from po_vendors(any table)? what does it do
and
what is count(1) from po_vendors(any table)?
what is count(0) from po_vendors(any table)
the out put is same
what is the difference

Answer Posted / sandeep sutar

Result if count(*), count(1), count(0) will be same.

Howevenr,

When we use count(*) then
first oracle query executer gets all the rows in buffure
cache, including all column and then counts all the rows.
this will impact with less performance.


select count(1) or count(0)
This reduces unwanted I/O by selecting just '1' against all
the rows.


Best practice to getting rowcount of table is

select count(rowid) from table_name;

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the various types of value set.

615


do you know is it possible to run the interface without using oracle apps?

638


What do you understand by soa?

680


q)what are the validations in sql*loader

1731


What is sca and how is it useful?

649






what is the difference between request group and request security in oracle apps?

5034


In sequence i want to 11 and 15th values how we will write?

1566


List the types of flexfield?

594


can we use look up type instead of a pofile option?or valueset?is it possible how?

1776


how can i print random rows in plsql table

1924


List of all the modules under Manufacturing, Finance and Distribution in oracle applications?

1790


What does appl_top directory contain?

636


Plz anybody send me Technical specification for AP Interface

1995


tell me the scenarios of the independent in reports

2098


what is global tempory table?

6276