-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(torii-core): add indices to speed up queries (#2824)
* feat(torii-core): add indices to speed up queries * fmt
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 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
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,9 @@ | ||
-- Add index on the updated_at column of the entities table. As we are now allowing querying entities by their updated_at | ||
-- we need to ensure that the updated_at column is indexed. | ||
CREATE INDEX idx_entities_updated_at ON entities (updated_at); | ||
|
||
-- Add indices on the event_messages_historical table. | ||
CREATE INDEX idx_event_messages_historical_id ON event_messages_historical (id); | ||
CREATE INDEX idx_event_messages_historical_keys ON event_messages_historical (keys); | ||
CREATE INDEX idx_event_messages_historical_event_id ON event_messages_historical (event_id); | ||
CREATE INDEX idx_event_messages_historical_executed_at ON event_messages_historical (executed_at); |