Created
December 16, 2025 06:51
-
-
Save Sherlockboy/e5f7cc7b4434fda72f2f952e16fc7d58 to your computer and use it in GitHub Desktop.
Query optimization task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * The admin reports that the "Community Members" page takes 15 seconds to load. | |
| * It shows 10K members with their last activity, course progress, and subscription status. | |
| */ | |
| $members = Community::find($id) | |
| ->members() | |
| ->with(['lastActivity', 'courseProgress', 'subscription']) | |
| ->paginate(50); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment