Skip to content

Commit

Permalink
Add computed index for partial versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LawnGnome committed May 23, 2023
1 parent 456fb9b commit 757dce5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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 migrations/2023-05-23-211653_add-partial-version-index/up.sql
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.

Copy link
@Turbo87

Turbo87 May 24, 2023

Member
    versions (crate_id, split_part(num, '+', 1));

without the crate_id in the index the performance appears to be worse on my machine than without having any index at all 😅

0 comments on commit 757dce5

Please sign in to comment.