hi..
i need to optimize my select query ..
my situation is like this ..
i have 15 lac recors in my table..
the following query takes nine seconds to give the required output..
SELECT max(ah.AUC_AMT),
SUBSTRING_INDEX(GROUP_CONCAT(SUBSTRING_INDEX(ah.AUC_CUS_NAME,'@',1) order by AUC_AMT DESC SEPARATOR '|_|'),'|_|',3),
timediff(av.AUC_END_TIM,time(now())) as RemTime,
av.AUC_END_TIM,av.AUC_RSV_PRC,av.AUC_DATE,av.AUC_STATUS
from auc_hist_tbl as ah, aucveh_sched_tbl as av
where ah.AUC_UNI_NO = ''
AND av.AUC_UNI_NO = ''
auc_hist_tbl has 15 lac records ... i have indexed AUC_UNI_NO ..
but still its taking time ..
can u guide where's my query going wrong..
thanks ..
Moderator's Comments:
|
|
Double post. Continue here.
|
|