GH-519 - Improve Postgres default indexes.

We now use a hash index for the serialized event to improve performance.
This commit is contained in:
Oliver Drotbohm
2024-05-21 09:03:29 +02:00
parent 919d565572
commit f8283fa644

View File

@@ -8,5 +8,5 @@ CREATE TABLE IF NOT EXISTS event_publication
completion_date TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (id)
);
CREATE INDEX IF NOT EXISTS event_publication_by_listener_id_and_serialized_event_idx ON event_publication (listener_id, serialized_event);
CREATE INDEX IF NOT EXISTS event_publication_serialized_event_hash_idx ON event_publication USING hash(serialized_event);
CREATE INDEX IF NOT EXISTS event_publication_by_completion_date_idx ON event_publication (completion_date);