Keep updating the summary of Java technology stack, Java, MySQL, various middleware, etc., follow the public account “Asmaru Notes” to get the first update.
Collect technology-related e-books, interview questions, partners in need can pay attention to the public number [A Pill notes], no routine to receive.
1. The background
Count (*) = count(*) = count(*) = count(*);
But the harsh answer is that if you already use the right indexes, there’s basically nothing to optimize. Once there is a slow query, it is a slow query, to change, can only count or through other search platforms to do.
Today, let’s take a look at why this is the case and answer some of the most common puzzles you encounter on a daily basis.
2. Implementation of count(*)
Of course, we are not talking about where conditions here, and MyISAM is also very slow with where conditions.
3. Correct opening method
3) Other data analysis platforms for aggregation
Count (*) = count(*);
The answer is no. The table ws here is only a reference value.
So this sample estimate is very inaccurate. How inaccurate? Official documentation says it could be 40 to 50 percent.
4. About those weird counts (?)
When we look at some old code query, we often see the count(1), count(ID), count(field), etc., so they are not better than each other, is there any difference in performance?
Scan my official account “Ahmaru Notes” to get the latest updates as soon as possible.
No routine access to Java technology stack e-books, each large factory interview questions