any faster select count(*)
Posted by:
Antony Lai
Date: January 15, 2012 04:17AM
Dear All,
I just want to check a piece of data is exist in a table or not. Someone told me this:
1) select count(*) from table1 where index_column = 'xxx'; // is slow
it should be:
2) select count(index_column) from table1 where index_column = 'xxx';
OR
3) select 1 from table1 where index_column = 'xxx';
OR
4) select count(1) from table1 where index_column = 'xxx';
Is it true? Thank you very much!
Best Regards,
Antony
Subject
Written By
Posted
any faster select count(*)
January 15, 2012 04:17AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.