The recent optimization of Oracle database efficiency, and then on the Internet to check the existence of a number of high-efficiency methods
There are a lot of suggestions on the Internet first method, I did a test, but probably not enough data volume, 42,667 Records, do not know what a large amount of data is a situation
Many highly efficient ways to advise online
SELECT * from item where item= ' 1b241371x0021 ' and rownum<2;
But the result of my test:
SELECT * from item where item= ' 1b241371x0021 ' and rownum<2;
1 rows selected in 0.047 seconds
COUNT (*) mode
Select COUNT (*) from item where item= ' 1b241371x0021 ';
1 rows selected in 0.016 seconds
Exists way
Select COUNT (*) from the dual where exists (select 1 from item where item= ' 1b241371x0021 ');
1 rows selected in 0.015 seconds
From the test results, the latter two methods are significantly more efficient than the previous one.
Efficiency issues with Oracle query logging