I have a query like below. This query is working fine but since I have huge amount of data to check, this query running is slower.
Can anybody help me how to optimize this query?
SELECT * from trn where concat(comp_id,cus_id)
IN (select concat(comp_id,cus_id) FROM cus where sid='A0001')
AND docdate between ('2018-01-01') and ('2018-04-30')