From 9c9a9ade12825af26f9c4cfac3efbe4e104aa1ad Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Wed, 28 Mar 2018 12:22:55 -0400 Subject: 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. --- store/sqlstore/channel_store.go | 1 - 1 file changed, 1 deletion(-) (limited to 'store/sqlstore/channel_store.go') 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") -- cgit v1.2.3-1-g7c22