Sorting index fix for role lookups: adds profile_role_role_created_profile_id_idx index on profile_role
This commit is contained in:
parent
fb65d5901d
commit
146d6b8b73
@ -18,3 +18,6 @@ alter table reply add index reply_profile_id_modified_notice_id_idx (profile_id,
|
|||||||
|
|
||||||
-- Needed for sorting group messages by timestamp
|
-- Needed for sorting group messages by timestamp
|
||||||
alter table group_inbox add index group_inbox_group_id_created_notice_id_idx (group_id, created, notice_id);
|
alter table group_inbox add index group_inbox_group_id_created_notice_id_idx (group_id, created, notice_id);
|
||||||
|
|
||||||
|
-- Helps make some reverse role lookups more efficient if there's a lot of assigned accounts
|
||||||
|
alter table profile_role add index profile_role_role_created_profile_id_idx (role, created, profile_id);
|
||||||
|
@ -627,7 +627,8 @@ create table profile_role (
|
|||||||
role varchar(32) not null comment 'string representing the role',
|
role varchar(32) not null comment 'string representing the role',
|
||||||
created datetime not null comment 'date the role was granted',
|
created datetime not null comment 'date the role was granted',
|
||||||
|
|
||||||
constraint primary key (profile_id, role)
|
constraint primary key (profile_id, role),
|
||||||
|
index profile_role_role_created_profile_id_idx (role, created, profile_id)
|
||||||
|
|
||||||
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user