SELECT DISTINCT A.Field1, A.Field2, A.Field3
FROM Creator.Table1 A, Creator.Table2 B
WHERE A.Field4 = 'LA'
AND A.Field5_1 = B.Field5_2 [Field 5_1 : of Table1, Field 5_2 : of Table2]
AND A.Field6 = 0
AND B.Field7 IN ('1,'2','3','4','5')
AND A.Field8 IN ('11','12','13','14','15)' WITH UR;
But regardless of whether I run it through QMF or a Batch Job, I get a time-out.
Please suggest ways of improving this query.
I also tried the same by removing DISTINCT, still no success.
Note : Both the tables have a huge volume of data.