mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 02:22:16 +00:00
fix(setup): steps 10 and 11 (#5987)
* fix(step10): count amount of wrong_events manually * fix(step11): create index for better performance
This commit is contained in:
@@ -1 +1,12 @@
|
||||
SELECT id, creation_date FROM eventstore.events WHERE created_at IS NULL ORDER BY event_sequence DESC, instance_id LIMIT 20 FOR UPDATE
|
||||
SELECT
|
||||
id
|
||||
, creation_date
|
||||
FROM
|
||||
eventstore.events
|
||||
WHERE
|
||||
created_at IS NULL
|
||||
ORDER BY
|
||||
event_sequence DESC
|
||||
, instance_id
|
||||
LIMIT $1
|
||||
FOR UPDATE
|
||||
@@ -0,0 +1,8 @@
|
||||
CREATE INDEX IF NOT EXISTS ca_fill_idx ON eventstore.events (
|
||||
event_sequence DESC
|
||||
, instance_id
|
||||
) STORING (
|
||||
id
|
||||
, creation_date
|
||||
, created_at
|
||||
) WHERE created_at IS NULL;
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS eventstore.events@ca_fill_idx;
|
||||
@@ -0,0 +1,4 @@
|
||||
CREATE INDEX IF NOT EXISTS ca_fill_idx ON eventstore.events (
|
||||
event_sequence DESC
|
||||
, instance_id
|
||||
) WHERE created_at IS NULL;
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS eventstore.ca_fill_idx;
|
||||
Reference in New Issue
Block a user