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

adding partial index for uncommitted entries #816

Merged
merged 1 commit into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ddl/000007_uncommitted_idx.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN;
DROP INDEX IF EXISTS entries_uncommitted_branch_min_commit;
COMMIT;
8 changes: 8 additions & 0 deletions ddl/000007_uncommitted_idx.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- partial index on min_commit to locate uncommitted entries
BEGIN;
DROP INDEX IF EXISTS entries_uncommitted_branch_min_commit;
CREATE INDEX entries_uncommitted_branch_min_commit
ON catalog_entries USING btree
(branch_id ASC NULLS LAST, min_commit ASC NULLS LAST)
WHERE min_commit = '1000000000000000000'::bigint;
COMMIT;