-
Notifications
You must be signed in to change notification settings - Fork 132
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
Job count by state query performance #367
Comments
Would you be able to provide the differences in terms of execution plans? One without new index, one with, on that heavily-loaded database if possible? Would be nice if it's links to dalibo visualizer. |
Here are 2 screenshots from Query insights (Google CloudSQL PostgreSQL) : More explain : https://explain.dalibo.com/plan/043bdcc9d5e5cf1a |
I don't see why not, honestly. If it helps, it helps, while I personally can't see how it could regress anything. Would you be willing to create a PR for this new index? |
…ery-performance #367 - Improve job count by state query performance
It's been merged, but will be released later on when there are more changes. You're free to just continue using the same index as it will later be recreated with an update. |
Hi,
on a heavy loaded database instance with millions of hangfire runned jobs, I think I found a better index on job count by state query :
We might use this one that is using original where clause + included column :
create or replace index ix_hangfire_job_statename_is_not_null on job(statename) include (id) where statename is not null;
With that index, the query above is now performing an index only scan which performs better.
Do you think it could be a good option for your database init script ?
The text was updated successfully, but these errors were encountered: