Skip to content

Commit

Permalink
H-3723: Add link table indices (#5771)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann authored Dec 2, 2024
1 parent 6cd1744 commit c3030df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ CREATE TABLE entity_has_left_entity (
FOREIGN KEY (web_id, entity_uuid) REFERENCES entity_ids,
FOREIGN KEY (left_web_id, left_entity_uuid) REFERENCES entity_ids
);
CREATE INDEX entity_has_left_entity_source_idx
ON entity_has_left_entity(web_id, entity_uuid);

CREATE TABLE entity_has_right_entity (
web_id UUID NOT NULL,
Expand All @@ -87,6 +89,8 @@ CREATE TABLE entity_has_right_entity (
FOREIGN KEY (web_id, entity_uuid) REFERENCES entity_ids,
FOREIGN KEY (right_web_id, right_entity_uuid) REFERENCES entity_ids
);
CREATE INDEX entity_has_right_entity_source_idx
ON entity_has_right_entity(web_id, entity_uuid);

CREATE TABLE entity_embeddings (
web_id UUID NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE INDEX entity_has_left_entity_source_idx
ON entity_has_left_entity(web_id, entity_uuid);
CREATE INDEX entity_has_right_entity_source_idx
ON entity_has_right_entity(web_id, entity_uuid);

0 comments on commit c3030df

Please sign in to comment.