By my knowledge brackets of COUNT statement specify which data should be projected and then counted

so if there is COLUMN then that column is projected (projection as database operation) and counted
* projects all columns
and COUNT(1) projects only 1 as value for each row that is OK with WHERE conditions

so in bad optimized database engine is COUNT(1) fastest choice

but by my short testing same problem few months ago oracle has this one well optimized

still I use COUNT(1) as best practice because it may only do good, no bad (in case you don't need to count distinct values of column, but all selected rows)

    hoppo

On 14.1.2010 16:08, Midana wrote:
Hello,

who knows the diference between this selects.

1 - SELECT COUNT(*) FROM TABLE
2 - SELECT COUNT(1) FROM TABLE
3 - SELECT COUNT(COLUMN) FROM TABLE

Midana Sana
-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to