Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Which one give better performance ? either Scalar sub query or Left outer join?

Kannan SekarJan 29 2021

Below is the sample query.. The final output is 8K rows.. In explain plan cost shows 292.. And total query execution time is 35 secs. how will re-write the below query with better performance?
select acctid, userfirstname, userlastname, assettype,
(select max(riskscore) from risk r where r.rid = TA.rid) as riskscore
from TA inner join TB on TA.acctid = TB.acctid inner join TC on TC.key = TB.key;

Comments
Post Details
Added on Jan 29 2021
3 comments
2,730 views