SQL Tuning Left Outer Join
The below query with left outer join runs for more 6 hours and does not complete in production. The stats are all up to date.
SQL> explain plan for
When I changed the left outer join to a inner join the query comes back in few minutes. Please help me tune the query and why does left outer join take so long to run?
select /* + ordered use_hash (a, b) */
a.case_closed_dt, a.acct_id, a.activity_id, substr(a.rep_user_id,1,5) as rep_user_id, a.cnctn_id, a.contact_method, a.acct_num_ent,b.contactor_type, b.view_type
0