MySQL Forums
Forum List  »  Performance

Slow query in mysql 5.7.20
Posted by: Murawweh Daher
Date: December 17, 2017 07:42AM

Hi All,

The below query take 58 second and that long time for such data. i created indexes but still no enhancement on data fetching time.

are there any suggestions?

explain SELECT count(adjustmentamount) totalRefill , DATE(airtimestamp) FROM air_drs a ,sdp_drs b
where b.ISDUPLICATED='1' and VOUCHERBASEDR='0' and REFILLPROFILEID='7'
and UPPER (a.extdata1) IN ('ADD', 'D_ADD') and upper(a.AIRRECORDTYPE)='REFILL'
and a.accounteventid = b.accounteventid group by DATE(airtimestamp)


1 SIMPLE b ref accounteventid,isduplicated isduplicated 5 const 2162416 100.00 Using where; Using temporary; Using filesort
1 SIMPLE a eq_ref PRIMARY,accounteventid_UNIQUE,accounteventid,airtimestamp,voucherbasedr PRIMARY 302 jndr_sch.b.accounteventid 1 5.00 Using where



Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Slow query in mysql 5.7.20
685
December 17, 2017 07:42AM
363
December 17, 2017 09:51AM
434
December 17, 2017 11:55AM
388
December 17, 2017 01:36PM
340
December 18, 2017 12:33AM
335
December 18, 2017 10:09AM
382
December 17, 2017 11:02AM
571
December 18, 2017 01:54AM


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.