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

Very slow query on Api::V1::PlantsController#index #78

Open
wagenet opened this issue Dec 18, 2020 · 1 comment
Open

Very slow query on Api::V1::PlantsController#index #78

wagenet opened this issue Dec 18, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wagenet
Copy link
Contributor

wagenet commented Dec 18, 2020

Using Skylight we can see that there is a very slow query on this endpoint: https://oss.skylight.io/app/applications/nz7MAOv6K6ra/1608176820/4h54m/endpoints/Api::V1::PlantsController%23index?responseType=json

image

It looks like it happens 9/10 times. I checked and confirmed that the basic indexes are in place, but was limited in the investigation that I could do since the test database has a much smaller number of records than the real database would have.

@wagenet wagenet added the bug Something isn't working label Dec 18, 2020
@wagenet
Copy link
Contributor Author

wagenet commented Dec 18, 2020

I should also mention that I think an EXPLAIN ANALYZE on the production database might shed some light on the situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants