Why a sort after merge join

Table Retail_Audit_All_Markets has PK on columns MC_Market_Code, Account, Product, Audit_Date, Activity. This is joined wiht table PODRIA_Reprocess that has PK on MC_Market_COde, Account, Product, min_Audit_Date. Tables are joined. As expected merge join operation is used, but it is followed by sort that sort on MC_Market_Code, Account, Product, Audit_Date, Activity. So same order as PK for table Retail_Audit_All_Markets and first part of PK PODRIA_Reprocess. So why is sort happening and what needs to be sorted?

avatar image By Wilfried 0 asked Oct 20 at 11:07 PM
more ▼
(comments are locked)
10|10000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.

Follow this question

Topics:

x641
x455
x25
x12

asked: Oct 20 at 11:07 PM

Seen: 17 times

Last Updated: Oct 20 at 11:07 PM