Optimize this query
Dear friends,
i have the following query
select distinct `loan_trend_ltr`.`ltr_period` AS `ltr_period`,
`loan_trend_ltr`.`bnk_code` AS `bnk_code`,
`contact_ctc`.`ctc_province_code` AS `ctc_province_code`,
`loan_trend_ltr`.`lon_class` AS `lon_class`,
`loan_trend_ltr`.`lon_status` AS `lon_status`,
`loan_trend_ltr`.`branch_id` AS `branch_id`,
`loan_trend_ltr`.`lon_sys_id` AS `lon_sys_id`,
`loan_trend_ltr`.`lon_update_date` AS `lon_update_date`
from (`loan_trend_ltr`
join `contact_ctc`
on(((`loan_trend_ltr`.`bnk_code` = `contact_ctc`.`bnk_code`)
and (`contact_ctc`.`branch_id` = `loan_trend_ltr`.`branch_id`))))
where (`contact_ctc`.`ctc_province_code` is not null)
group by `loan_trend_ltr`.`lon_sys_id` having (`loan_trend_ltr`.`lon_status` = _utf8'ACTIVE')
each table has 100000+ records so it takes so long time running.
anyone please help me optimize this query
Subject
Written By
Posted
Optimize this query
July 31, 2012 08:05PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.