diff options
-rw-r--r-- | db/08to09.sql | 3 | ||||
-rw-r--r-- | db/08to09_pg.sql | 3 | ||||
-rw-r--r-- | db/statusnet.sql | 2 | ||||
-rw-r--r-- | db/statusnet_pg.sql | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/db/08to09.sql b/db/08to09.sql index a0e37f0f1..e6842225b 100644 --- a/db/08to09.sql +++ b/db/08to09.sql @@ -42,3 +42,6 @@ create table login_token ( constraint primary key (user_id) ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; +alter table fave + drop index fave_user_id_idx, + add index fave_user_id_idx (user_id,modified); diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql index 197fcabfd..956c4dee5 100644 --- a/db/08to09_pg.sql +++ b/db/08to09_pg.sql @@ -48,3 +48,6 @@ create table login_token ( constraint primary key (user_id) ); +alter table fave + drop index fave_user_id_idx, + add index fave_user_id_idx using btree(user_id,modified); diff --git a/db/statusnet.sql b/db/statusnet.sql index 3ed4e2c48..510c8866e 100644 --- a/db/statusnet.sql +++ b/db/statusnet.sql @@ -165,7 +165,7 @@ create table fave ( constraint primary key (notice_id, user_id), index fave_notice_id_idx (notice_id), - index fave_user_id_idx (user_id), + index fave_user_id_idx (user_id,modified), index fave_modified_idx (modified) ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql index 0e5e96c32..710883e57 100644 --- a/db/statusnet_pg.sql +++ b/db/statusnet_pg.sql @@ -171,7 +171,7 @@ create table fave ( ); create index fave_notice_id_idx on fave using btree(notice_id); -create index fave_user_id_idx on fave using btree(user_id); +create index fave_user_id_idx on fave using btree(user_id,modified); create index fave_modified_idx on fave using btree(modified); /* tables for OAuth */ |