Steps to Reproduce
- Create a large number of courses, and lessons with many students enrolled
- Browse the Reports pages (or any other page)
- Monitor the queries generated
- See a query getting generated for all of them, making many of them load slow (As attached in the screenshot below)
Screenshot / Video
This query adding more than two seconds to the loading time of Students and Courses pages under Reports. For ~3 Courses, 300 lessons each and ~1200 students enrolled to all of them. The page takes about 4 seconds to load, and this query is responsible for half of it.
