I just want to make an outer join query using an 'order by' clause. The problem is that I thing that the query optimizer does not take into consideration the index that I have in the table.

The query below take about 13 mins to be executed in the PCC
Select ADID,
ad1.UDCVValueStr as ADSType,
from Address
left join UDCValue ad1 on (ad1.UDCVID = 1 and ad1.UDCVLineNo = ADSTypeLineNo )
order by ADID

Note that in the table address exists a unique index on column ADID. (For information purposes I must say that the table 'Address' has 15000 rows and table 'UDCValue' has 1000 rows).

I try to run the same query without the 'order by' clause and it took about 1.5 seconds!!!

What is the problem? Can you help us? Is there any work around to overcome the problem?