The problem of ranking goods according to weight?

many goods. According to the sort, sales volume, collection volume and price of the goods. The four fields correspond to different weight values. Now after writing, the interface returns too slowly for more than 10 seconds to return. How to write it more efficiently?

Php
Jun.07,2022

add a weight field.
add different numerical corresponding values to different things, then increase or decrease the values when the corresponding events occur, and then sort by numerical values.


create a table statement and paste it with sql

Menu