X
X
XenK2016-08-11 06:52:48
PHP
XenK, 2016-08-11 06:52:48

MySQL database query optimization?

Now the user has the opportunity to make a selection of data for N days (a lot of data is loaded for 1 day). If, for example, 5 people make such a selection at the same time, then the database will hang.
There is an idea to make a selection for 3 months and save it in the cache (data for the past days do not change), and actually update this cache when the user first loads the data, once a day. And then the search by day will be carried out within this cache, if the data selection matches it.
Is it worth doing such manipulations, or is there a better way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Optimus, 2016-08-11
Pyan @marrk2

How many rows are in the table?
What is the selection condition?
How long does one request take?
How many results does the answer contain?
What does explain show?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question