Sort-merge costs

If the query plan includes a sort-merge join, the cost of creating the worktables and sorting them are printed. These messages include the total cost that is added to the query cost:

Sort-Merge Cost of Inner = 538 
Sort-Merge Cost of Outer = 5324

These are the total costs of performing the sort-merge work, representing the logical I/O on the worktables multiplied by 2.