

Where decode(a.sql_id,null,a.prev_sql_id, a.sql_id)=b.sql_idĪnd decode(a.sql_id,null,a.prev_child_number, a.sql_child_number)=b.child_numberĪnd a.serial#=&serial Also a bad idea - have you checked the exection plan ?ĭo you think it might be a good idea to think about the need for statistics on fixed objects ? Predicate Information (identified by operation id):Ĥ - filter("KGLOBT02"0 AND "INST_ID"=USERENV('INSTANCE'))Ĩ - filter("S"."INDX"=43 AND "S"."INST_ID"=USERENV('INSTANCE') ANDīITAND("S"."KSSPAFLG",1)0 AND BITAND("S"."KSUSEFLG",1)0 AND "S"."KSUSESQL"="KGLHDPAR")The join on address is a very bad idea, and you're missing the child_number. | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

Here's a typical execution plan for your suggestion: Join v$session to v$sql by sql_id and child_number. You're FORCING a "full table scan" of the library cache objects when you could be using an indexed access path. Sid=43 Very bad suggestion for a production system.

1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.8K Oracle Database Express Edition (XE).3.7K Java and JavaScript in the Database.
