Skip to content

Commit

Permalink
new indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodolfo committed Dec 5, 2024
1 parent 9cc635d commit 51c2f7d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/resources/ddl/1-events_table.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\connect postgres ;

-- TODO
-- https://dev.to/aws-heroes/scalable-sequence-for-postgresql-34o7
-- https://theburningmonk.com/2024/11/eventbridge-best-practice-why-you-should-wrap-events-in-event-envelopes/

Expand All @@ -15,6 +16,8 @@ CREATE TABLE events
CONSTRAINT domain_ids_length_check CHECK (array_length(domain_ids, 1) BETWEEN 1 AND 7)
);

CREATE INDEX domain_ids_gin_index
ON events USING gin (domain_ids);
CREATE INDEX domain_ids_gin_index ON events USING gin (domain_ids);

CREATE INDEX idx_events_event_type ON events(event_type);

CREATE INDEX idx_events_correlation_id ON events(correlation_id);

0 comments on commit 51c2f7d

Please sign in to comment.