I inherited this query. It takes a long time to run. A couple of questions...1. Is it because there's no join (should a left join be in between the two tables in the From section?2. Should the bold part have "on" in front of where fields are joining3. Should the where clause go after the bold section?SELECT DISTINCT AL1.CLMS, AL1.COS, AL2.JURIS_MVT_SEQ_NUM, RIGHT(AL2.ORG_ID,3)AS ORG_ID, AL2.JURIS_MVT_TYP FROM MT2.CLAIM AL1, MT2.JURISMVT AL2 WHERE (AL1.CLMS=AL2.CLMS AND AL1.BICNUM=AL2.BICNUM AND AL1.REF_NUM=AL2.REF_NUM AND AL1.TYP_OF_ACTN=AL2.TYP_OF_ACTN AND AL1.APP_STDT=AL2.APP_STDT AND AL1.ACTV_IND_CD=AL2.ACTV_IND_CD) AND ((AL1.ACTV_IND_CD='A' AND AL1.ADJU_LVL='I' AND AL1.WKLD='04' AND(NOT AL1.APP_RCPDT IS NULL)))
Would those changes be efficient and make the query run faster?