CPU costing - Simple query
I am testing a simple query in 10g (10.2.0.4). I don´t have system statistics in the database. The column indicavisible of the table test1 is char(1).
I run the same query two times but the second case has an implicit conversion:
select * from test1 where indicavisible='0';
select * from test1 where indicavisible=0;
The cpu_cost for the first case is greater than second. The output is:
First query:
OPERATION CPU_COST FILTER_PREDICATES
------------------------------ ---------- ----------------------------------------
SELECT STATEMENT
TABLE ACCESS 44753683 "INDICAVISIBLE"='0'
Second query:
OPERATION CPU_COST FILTER_PREDICATES
------------------------------ ---------- ----------------------------------------
SELECT STATEMENT
TABLE ACCESS 37031903 TO_NUMBER("INDICAVISIBLE")=0