CodePudding user response:
First of all, in the case of no index, it is generally believed substr is better than that of the like;Second, if there are indexed end_time fields, like use index, substr useless index, so the like is better than that of the substr;
But indexed, you can also use substr (end_time, 1, 4) to build index,
Relative merits, it still should according to the specific circumstances of test and analysis,