From 8871e3d6359c995ddd3422d4e45299076e8e3a6e Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 12 Sep 2022 18:22:14 -0500 Subject: [PATCH] Clarify why easier See https://github.com/matrix-org/synapse/pull/13771#discussion_r968250300 --- docs/development/database_schema.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/development/database_schema.md b/docs/development/database_schema.md index 7a79bef5a3..1d29ee5a8e 100644 --- a/docs/development/database_schema.md +++ b/docs/development/database_schema.md @@ -210,7 +210,8 @@ scoped, we can reduce the possibility of a hash collision. When scoping (`PRIMARY KEY (room_id, event_id)`) and lookups should be done through the pair `(room_id, event_id)`. Another benefit of scoping `event_ids` to the room is that it makes it very easy to find and clean up everything in a room when it -needs to be purged. +needs to be purged (no need to sub-`select` query or join from the `events` +table). `event_id` global uniqueness has had a lot debate in places like https://github.com/matrix-org/matrix-spec-proposals/issues/2779 and