Mysql avg optimization

use mysql avg to find the average of a floating-point field of a table. The execution time of 200000 data is about 0.5 seconds. This field has no index, and where is indexed. How to optimize such a table? 200000 is just a test, and the actual amount of statistical data at a time is about 3 million rows.

Apr.03,2021
Menu