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

feat: add reverse lookup indices #875

Merged
merged 1 commit into from
May 12, 2022
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP INDEX keto_relation_tuples_reverse_subject_ids_idx;
DROP INDEX keto_relation_tuples_reverse_subject_sets_idx;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX keto_relation_tuples_reverse_subject_idx ON keto_relation_tuples;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE INDEX keto_relation_tuples_reverse_subject_idx ON keto_relation_tuples (nid,
subject_id,
subject_set_namespace_id,
subject_set_object,
subject_set_relation,
relation,
namespace_id
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CREATE INDEX keto_relation_tuples_reverse_subject_ids_idx ON keto_relation_tuples (nid,
subject_id,
relation,
namespace_id
) WHERE subject_set_namespace_id IS NULL AND subject_set_object IS NULL AND subject_set_relation IS NULL;

CREATE INDEX keto_relation_tuples_reverse_subject_sets_idx ON keto_relation_tuples (nid,
subject_set_namespace_id,
subject_set_object,
subject_set_relation,
relation,
namespace_id
) WHERE subject_id IS NULL;