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

Suggested index by PgHero #1292

Open
AliOsm opened this issue Mar 20, 2024 · 0 comments
Open

Suggested index by PgHero #1292

AliOsm opened this issue Mar 20, 2024 · 0 comments

Comments

@AliOsm
Copy link

AliOsm commented Mar 20, 2024

While monitoring my Rails app using PgHero, I got a suggestion to add an index to good_jobs table:

add_index :good_jobs, [:error], algorithm: :concurrently

The cause was this query:

SELECT COUNT(*) FROM "good_jobs" WHERE "good_jobs"."retried_good_job_id" IS NULL AND "good_jobs"."finished_at" IS NOT NULL AND "good_jobs"."retried_good_job_id" IS NULL AND "good_jobs"."error" IS NOT NULL

Do you think it is important?

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

No branches or pull requests

1 participant