456789psw - Wednesday, May 16, 2018 7:17 AM
Not solved. You found a "patch". The use of "DISTINCT" is still a problem and indicates that the criteria is insufficient to prevent duplication of rows. Solve that and get the amount of time and resources being used by the query down and that will be the beginning of a true solution.
--Jeff Moden
Change is inevitable... Change for the better is not.