I have a table of trades with 2.5M rows.
I try to run this query:
SELECT id, price FROM trade
order by price DESC
limit 30
this query takes about 3 seconds.
I tried to create an index for the columns that I order by but the order is generic and can be on other columns (quantity, date, etc...).
What can I do to improve the execution time of order 2.5M rows without indexes?