When you use a like fuzzy query in an SQL statement, you should try to avoid the percent of percent, because the fuzzy query is relatively slow, and when this happens, you should consider optimization.
For example, I query a table for records created in 2012
SELECT * from ' component_data ' WHERE creation_date like ' 2012% ';
Time to get
[SQL] SELECT * from ' component_data ' WHERE creation_date like ' 2012% '; rows affected: 0 Time: 0.500ms
Consider the following SQL after optimization
SELECT * from ' component_data ' WHERE creation_date>= ' 2012-01-01 ' and creation_date< ' 2013-01-01 ';
Run results
[SQL] SELECT * from ' component_data ' WHERE creation_date>= ' 2012-01-01 ' and creation_date< ' 2013-01-01 '; rows affected: 0 Time: 0.328ms
It can be seen that the improvement after the optimization is very large. This difference is more pronounced when the results of the query are relatively long. I have more than 9,000 data for this query.
I just cite an example. When you encounter like query, we should give full play to your intelligence, specific problems to be specific treatment, to optimize