troubleshooting Question

explain plan for MERGE

Avatar of royjayd
royjayd asked on
Oracle Database
12 Comments2 Solutions1329 ViewsLast Modified:
hi experts

I ran a simple explain plan for my merge statement

explain plan for merge into product p
using product_changes pc ON (p.product_id = pc.product_id)
when matched then
update set p.product_type_id = pc.product_type_id, =,p.description = pc.description,p.price = pc.price
when not matched then --new rows
insert (p.product_id,p.product_type_id,,p.description,p.price) values (pc.product_id,pc.product_type_id,,pc.description,pc.price);

select * from table(dbms_xplan.display)

the result is attached.

Can anyone please explain me how i can improve the performance.
Join our community to see this answer!
Unlock 2 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros