Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add indexes to Eloquent health check results table #83

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

jackwh
Copy link
Contributor

@jackwh jackwh commented Mar 12, 2022

I noticed frequent slow queries being logged in Telescope when running Health Checks on a busy site. This PR solves that problem by adding indexes to the created_at and batch columns.

Screenshot 2022-03-12 at 21 30 22

Large tables become very slow to order by `created_at` or filter by `batch` columns.
@freekmurze freekmurze merged commit d1e43d3 into spatie:main Mar 14, 2022
@freekmurze
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants