Sql qurey tuning
hi to all,
can you anyone help on this or give me your valuable thoughts?
1) this qurey took more then 3 hours ??
2) all index column using "like" ?
SQL> explain plan for select distinct s.login yesid, an.last_name customername, d.device_id phonenum, a.account_no accountnumber,
2 decode(a.status, 0,'Defunct',10100,'Active',10102,'Inactive',10103,'Closed') accountstatus, pm.nric IC
3 from PINPDC.device_t d, PINPDC.device_services_t ds, PINPDC.service_t s, pinpdc.account_t a,
4 pinpdc.account_nameinfo_t an, PINPDC.profile_mykad_t pm, PINPDC.profile_t p
5 where d.poid_id0=ds.obj_id0 and ds.account_obj_id0=s.account_obj_id0
can you anyone help on this or give me your valuable thoughts?
1) this qurey took more then 3 hours ??
2) all index column using "like" ?
SQL> explain plan for select distinct s.login yesid, an.last_name customername, d.device_id phonenum, a.account_no accountnumber,
2 decode(a.status, 0,'Defunct',10100,'Active',10102,'Inactive',10103,'Closed') accountstatus, pm.nric IC
3 from PINPDC.device_t d, PINPDC.device_services_t ds, PINPDC.service_t s, pinpdc.account_t a,
4 pinpdc.account_nameinfo_t an, PINPDC.profile_mykad_t pm, PINPDC.profile_t p
5 where d.poid_id0=ds.obj_id0 and ds.account_obj_id0=s.account_obj_id0
0