diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-03-28 12:22:55 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-03-28 09:22:55 -0700 |
commit | 9c9a9ade12825af26f9c4cfac3efbe4e104aa1ad (patch) | |
tree | 685ec85de574e0932365e63cac51661a179fe8f9 /store/sqlstore/channel_store.go | |
parent | 1ccad749f1edf112be64de849ef31781ed96ff7e (diff) | |
download | chat-9c9a9ade12825af26f9c4cfac3efbe4e104aa1ad.tar.gz chat-9c9a9ade12825af26f9c4cfac3efbe4e104aa1ad.tar.bz2 chat-9c9a9ade12825af26f9c4cfac3efbe4e104aa1ad.zip |
Remove the index on Channels.DisplayName. (#8530)
As outlined in [this
discussion](https://pre-release.mattermost.com/core/pl/uw5bwmkb6irkbkn6pk9rkzpytr),
this index causes issues with MySQL's query planner, leading to full
table scans in a case where it would have made more sense to leverage a
filesort.
Diffstat (limited to 'store/sqlstore/channel_store.go')
-rw-r--r-- | store/sqlstore/channel_store.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index e7a157192..fe4c561ca 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go @@ -90,7 +90,6 @@ func NewSqlChannelStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface) func (s SqlChannelStore) CreateIndexesIfNotExists() { s.CreateIndexIfNotExists("idx_channels_team_id", "Channels", "TeamId") s.CreateIndexIfNotExists("idx_channels_name", "Channels", "Name") - s.CreateIndexIfNotExists("idx_channels_displayname", "Channels", "DisplayName") s.CreateIndexIfNotExists("idx_channels_update_at", "Channels", "UpdateAt") s.CreateIndexIfNotExists("idx_channels_create_at", "Channels", "CreateAt") s.CreateIndexIfNotExists("idx_channels_delete_at", "Channels", "DeleteAt") |