MySQL Forums
Forum List  »  InnoDB

Re: Help on Query with DATE BETWEEN not performant
Posted by: Kristijan Marin
Date: February 03, 2020 12:26PM

I just disabled the cache, did a restart ... lowered the number of instances to 2.

and did try your query ... duration shows 12.2sec, fetch is 155sec for 23367 rows returned.


Another thing I did .. is I forced index that has date & ID in it ... explain plan showed 1.2mil rows ... executing this took 2.5sec for duration and fetch was 6.8

where without this force it tool 11.7sec for duration & 10.7 for fetch ...

I just used another customer that I didn't use before.

I tried STRAIGHT_JOIN but no difference either ...

is our database totaly messed up or are we missing something ??

Peter ... your help is so appreciated, thank you for your time trying to solve this mystery

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Help on Query with DATE BETWEEN not performant
628
February 03, 2020 12:26PM


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.