Skip to content

Commit 5a52f18

Browse files
committed
Tighter index + if not exists
1 parent 80c9ec7 commit 5a52f18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
-- composite index to speed up query for user orders with quote
2-
CREATE INDEX CONCURRENTLY orders_owner_class_valid_composite ON orders (owner, class, true_valid_to DESC);
2+
CREATE INDEX CONCURRENTLY IF NOT EXISTS orders_owner_class_valid_composite ON orders (owner, class, true_valid_to DESC) WHERE cancellation_timestamp IS NULL;

0 commit comments

Comments
 (0)