Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If:
>About 100k records are added to the table every day, and therefore the table is very large.
and there is a problem with 5k elements - your site will not work.
Solution to the problem:
1 - index fields
2 - InnoDB
3 - base scaling
4 - ...
count itself is a simple operation. Most likely chooses for a long time. Is there an index?
What does EXPLAIN say?
> but the query itself, which returns 5000 elements, takes a long time to complete.
this cannot be. or non-indexed fields are used in the condition
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question