MySQL Forums
Forum List  »  InnoDB

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

It is to return the list of all the IDs that are later filtered by the date,
which represents the "main" list on which other groupings are done ...

For our needs we have 4 queries ... they all are based on the "main" query but just the output is different ....

For one query we show all the media types grouped by the type of media
Another is grouped by the contract id
Then in another, we show all the keywords from all articles that were fetched in some period
and the last one shows real articles, 10 per page ... by using LIMIT x,y

We also show the number of all articles in this search ... first, we hade another query for the count , but now we just sum-up everything we get from media type query, cause this is actually the total of all articles anyway ... this way we removed the need for one additional query ...


As I said above, the "main" query we were talking about was/is the foundation of all other queries ... and cause that one was slow, everything was slow ...

Thank you.
Kris

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Help on Query with DATE BETWEEN not performant
593
February 04, 2020 01:03PM


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.