dear all,
can anybody suggest me the way to improve the following query (it take long long time to execute now...)
select b.productname,((select unitprice from pricehistory where priceeffectivedate <= a.issuedate and productcode=a.productcode limit 1)*qty) as amount
from invoice as a
left join product as b on a.productcode=b.productcode
Thanks,
can anybody suggest me the way to improve the following query (it take long long time to execute now...)
select b.productname,((select unitprice from pricehistory where priceeffectivedate <= a.issuedate and productcode=a.productcode limit 1)*qty) as amount
from invoice as a
left join product as b on a.productcode=b.productcode
Thanks,
Comment