Q
Problem solve Get help with specific problems with your technologies, process and projects.

Performance of MERGE statements

Has anyone analyzed the performance of a MERGE statement vs. separate INSERT and UPDATE statements? I have several MERGE statements taking over an hour every night and would like to improve on that.

Has anyone analyzed the performance of a MERGE statement vs. separate INSERT and UPDATE statements? I have several MERGE statements taking over an hour every night and would like to improve on that.
I haven't had occasion to do this, but I would encourage you to do so. Set up your two test scripts that differ only in their use of MERGE vs. INSERT/UPDATE, and run them separately with SQL trace enabled. Inspection of the formatted (via tkprof) trace files should tell you which is faster.
This was last published in July 2005

Dig Deeper on Oracle and SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close