MERGE Statement performance

  • hi all,

    Merge statement is giving performance difference when We are updating the records using merge vs first delete the desired records then run the merge statement query (it is using When not matched the Insert statement) then it is taking lesser time.

    What is the main reason for this difference?

    ๐Ÿ™‚

  • SQL* (7/6/2012)


    hi all,

    Merge statement is giving performance difference when We are updating the records using merge vs first delete the desired records then run the merge statement query (it is using When not matched the Insert statement) then it is taking lesser time.

    What is the main reason for this difference?

    Without seeing the query, or the table structures, or the execution plan? No idea.

    Have a look at the article link in my sig.

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply