How a right-merge or left-merge is performed

A right-merge or left-merge join always operates on a user table and a worktable created for the merge join. There are two steps:

  1. A table or set of tables is scanned, and the results are inserted into a worktable.

  2. The worktable is sorted and then merged with the other table in the join, using the index.