SQL Optimizaiton Methods for Merge Join

  • To optimise various operators, for instance in the case of merge join, we divide the total array into runs of data...and keep increasing the size with power of 2...but at the end we need to sort the total size of array. How is it effective then? since we finally work with sorting the complete array? Does it not just increase the complexity merely? Since we sort all cases....Plzz explain to me....With hope for a reply...

  • I'm more than a little confused by the question. The Merge Join operator inside of an execution plan is one of the most efficient operations there is. Problems around the merge join arise because it requires ordered data and if the data is not ordered it will perform sort operations. Better indexing can help this situation.

    What is it that you're trying to do?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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