I have 10k - 1m goods wich are discribed by fields product_id
, name
, category
, price
. Which is the fastest way to fetched 10 most expensive goods from each category? Previously I checked this answer https://stackoverflow.com/a/176985/9513268.
My table:
-------------------------------------
|product_id| name | category| price |
-------------------------------------
| 1 |Phone | Gadgets | 599.99|
------------------------------------
| 2 |Jacket| Clothes | 399.00|
-------------------------------------
| ... | ... | ... | ... |
-------------------------------------