FW: Problem Sql

FW: Problem Sql

 

  

Hi,

I have a problem sql here. If I pass the value of attribute 2 in the second line which is a varchar2 column, it returns the result in few seconds. But If I give the b.attribute2 in place of value, It never comes back. The view inthe first line is pulling data from the other database using db link. There is a index on case_cust_id,party_owner_id and attribute2 and I have anayzed the tables. I don't know what else to. I tried passing the index hint also. but that didn't work.

Any input is apprecitated.



SELECT COUNT(*) FROM XPBGC_PAYDEST_DASHBOARD_V a,csi_item_instances b

WHERE TO_CHAR(a.case_cust_id) = b.attribute2

AND b.owner_party_id = 80238;

Thanks,






Oracle LazyDBA home page