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

Missing index on 'resubmit_job_id' for 'jobs' table #194

Open
bzizou opened this issue Mar 22, 2022 · 0 comments
Open

Missing index on 'resubmit_job_id' for 'jobs' table #194

bzizou opened this issue Mar 22, 2022 · 0 comments

Comments

@bzizou
Copy link
Contributor

bzizou commented Mar 22, 2022

On a big OAR DB (70M jobs), the NodeChangeState command may lock OAR for a long time on such queries:

2022-03-22 13:21:01.231 CET [42503] oar@oar LOG:  duration: 413415.226 ms  statement:    SELECT COUNT(*)
                                        FROM jobs
                                        WHERE
                                            resubmit_job_id = 69815420

A new index solves this issue:

CREATE INDEX job_resubmit_job_id ON jobs (resubmit_job_id);

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

No branches or pull requests

1 participant