forked from ThinkUpLLC/ThinkUp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
webapp/install/sql/mysql_migrations/2011-03-07_improve_follows_indexes.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- | ||
-- Speed up queries on the follows table with better indexes | ||
-- | ||
|
||
ALTER TABLE tu_follows DROP INDEX user_id, ADD UNIQUE user_id (network, follower_id, user_id); | ||
|
||
ALTER TABLE tu_follows DROP INDEX active, ADD INDEX active (network, active); | ||
|
||
ALTER TABLE tu_follows ADD UNIQUE (network, last_seen); |