-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add computed index for partial versions
- Loading branch information
Showing
2 changed files
with
5 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
migrations/2023-05-23-211653_add-partial-version-index/down.sql
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 @@ | ||
DROP INDEX versions_num_partial_idx; |
4 changes: 4 additions & 0 deletions
4
migrations/2023-05-23-211653_add-partial-version-index/up.sql
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,4 @@ | ||
CREATE INDEX | ||
versions_num_partial_idx | ||
ON | ||
versions (split_part(num, '+', 1)); | ||
This comment has been minimized.
Sorry, something went wrong. |
without the
crate_id
in the index the performance appears to be worse on my machine than without having any index at all 😅