From d5626db71ba54bb027c1c12655a15cd978698def Mon Sep 17 00:00:00 2001 From: Silvan Date: Thu, 1 Jul 2021 18:44:00 +0200 Subject: [PATCH] fix(migration): enable hash shared index flag (#1954) * index on events for changes * check for current sequence before filter events * fix(migration): enable hash shared indexes feature --- migrations/cockroach/V1.50__changes_idx.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/migrations/cockroach/V1.50__changes_idx.sql b/migrations/cockroach/V1.50__changes_idx.sql index 2b56eff40..307041c4a 100644 --- a/migrations/cockroach/V1.50__changes_idx.sql +++ b/migrations/cockroach/V1.50__changes_idx.sql @@ -1 +1,6 @@ -CREATE INDEX changes_idx ON eventstore.events (aggregate_type, aggregate_id, creation_date) USING HASH WITH BUCKET_COUNT = 10; \ No newline at end of file +BEGIN; + +SET experimental_enable_hash_sharded_indexes=on; +CREATE INDEX changes_idx ON eventstore.events (aggregate_type, aggregate_id, creation_date) USING HASH WITH BUCKET_COUNT = 10; + +COMMIT;