See the following results:
Code:select count(*) from table1 --9746801 select count(*) from table2 --3845 SELECT count(*) FROM table1 WHERE table1.col3<=SYSDATE AND ( ( table1.col4='a' AND table1.col5<100 ) OR ( table1.col4='b' AND ( table1.col5=10 OR table1.col5=20 ) ) ) AND table1.col6<>'abc' AND table1.col6<>'def' AND table1.col6<>'ghi' --857747 in 138.389 seconds SELECT count(1) FROM table2 WHERE table2.colc='xy' AND table2.cold='z' --77 in 0.441 seconds




Reply With Quote