Add indices to state group tables

pull/14/head
Erik Johnston 2014-11-12 14:30:53 +00:00
parent e632fcd933
commit 58c0ef90c9
1 changed files with 13 additions and 0 deletions

View File

@ -30,4 +30,17 @@ CREATE TABLE IF NOT EXISTS state_groups_state(
CREATE TABLE IF NOT EXISTS event_to_state_groups(
event_id TEXT NOT NULL,
state_group INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS state_groups_id ON state_groups(id);
CREATE INDEX IF NOT EXISTS state_groups_state_id ON state_groups_state(
state_group
);
CREATE INDEX IF NOT EXISTS state_groups_state_tuple ON state_groups_state(
room_id, type, state_key
);
CREATE INDEX IF NOT EXISTS event_to_state_groups_id ON event_to_state_groups(
event_id
);