-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
speedup: add indexes on api key hash
- Loading branch information
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
server/migrations/2024-04-11-074046_add-indexes-for-api-key/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,3 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP INDEX IF EXISTS user_api_key_api_key_hash_index; | ||
DROP INDEX IF EXISTS user_api_key_blake3_hash_index; |
3 changes: 3 additions & 0 deletions
3
server/migrations/2024-04-11-074046_add-indexes-for-api-key/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,3 @@ | ||
-- Your SQL goes here | ||
CREATE INDEX IF NOT EXISTS user_api_key_api_key_hash_index ON user_api_key (api_key_hash); | ||
CREATE INDEX IF NOT EXISTS user_api_key_blake3_hash_index ON user_api_key (blake3_hash); |
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