Skip to content

Commit

Permalink
adding partial index for uncommitted entries (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzahij authored Oct 14, 2020
1 parent 6b46312 commit a38f158
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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;

0 comments on commit a38f158

Please sign in to comment.