-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1706 from Permify/ufuk/watchapi
refactor: transaction fetching updated as bulk queries
- Loading branch information
Showing
2 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
internal/storage/postgres/migrations/20241018182912_add_watch_indexes.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,8 @@ | ||
-- +goose NO TRANSACTION | ||
-- +goose Up | ||
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_attributes_txid ON attributes (tenant_id, created_tx_id, expired_tx_id); | ||
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_relation_tuples_txid ON relation_tuples (tenant_id, created_tx_id, expired_tx_id); | ||
|
||
-- +goose Down | ||
DROP INDEX CONCURRENTLY IF EXISTS idx_attributes_txid; | ||
DROP INDEX CONCURRENTLY IF EXISTS idx_relation_tuples_txid; |
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