Optimize GROUP BY&ORDER BY query
- by Jan Hancic
I have a web page where users upload&watch videos. Last week I asked what is the best way to track video views so that I could display the most viewed videos this week (videos from all dates).
Now I need some help optimizing a query with which I get the videos from the database. The relevant tables are this:
video (~239371 rows)
VID(int),…