-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from guenaelgonnord/367-job-count-by-state-qu…
…ery-performance #367 - Improve job count by state query performance
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SET search_path = 'hangfire'; | ||
|
||
DO $$ | ||
BEGIN | ||
IF EXISTS(SELECT 1 FROM "schema" WHERE "version"::integer >= 23) THEN | ||
RAISE EXCEPTION 'version-already-applied'; | ||
END IF; | ||
END $$; | ||
|
||
DROP INDEX IF EXISTS ix_hangfire_job_statename_is_not_null; | ||
CREATE INDEX ix_hangfire_job_statename_is_not_null ON job USING btree(statename) INCLUDE (id) WHERE statename IS NOT NULL; | ||
|
||
RESET search_path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters