Index threads.forum_id and comments.thread_id

This commit is contained in:
David Hoppenbrouwers
2022-10-08 14:24:52 +02:00
parent 78d902c9af
commit fc3874138a

View File

@@ -39,3 +39,8 @@ create table forums (
description text,
allowed_roles_mask integer not null
);
-- Both of these speed up searches significantly if there are many threads or comments.
-- Other indices have no measureable impact (yet, at least).
create index forum_id on threads(forum_id);
create index thread_id on comments(thread_id);