I am trying to run a query with some complicated calculations at 2 levels 1. class level 2. subclass level
When i do that i see both the queries execution takes much less the same time. I am concerned as to why this is happening as the sublass level has only 1/100 of the data held when compared to class data.
I have collected stats on the key columns and the columns i use for comparison for both the process. Can someone help as to why this is happening? and how i could avoid it. select t1.* from ( select a.*,b1.b11,b.b12,b.b13 from a join b b1 where a.key = b.key join b b2 on b1.b11 = b2.b11 and b1.b12 = b2.b12 and b1.b13 = b2.b13 ) t1 join ( select c.* from c where condt_flg = 'Y' )t2 on t1.keyvalue = t2.kevalue join ( select count(d.id) from d where ) t3 where t3.key values = t1.keyvalues