Hi, I have a Query that is running for 4 mins and I need to optimise the same. The skeleton of the query is as follows Select A.fld1, B.fld2, A.fld3, c.fld4, A.fld5, D.fld6....fldn from filea A left outer join fileb B on A.fld1 = B.fld2 left outer join file3 C on A.fld3 = C.fld4 left outer join file4 D on A.fld5 = D.fld6 group by a.fld1, b.fld2, ..... Order by A.fldn Since I am using left outer join, the join order depends on the fields in the join condition. Hence the Order by takes more time. I tried creating an index on the Order by field but it does not use it. If I remove the Order by clause, then the query runs in couple of seconds. But if I include the Order by clause, it takes four mins. Is there a way out of this?? and why is it working the way it is right now?? Thanx in advance. Regards Arun Prasad R

Reply With Quote