Performance of some of the queries that Mysql uses in Mattermost needs to be improved

Description

Summary

There are some queries that seem like they could be improved by utilizing indexes in the database. These are all provided by a user.

Example

Original query

A query like this can take up to or more than 20 seconds

Optimized query

QA Test Steps

The fix has been tested by the customer to be working. For regression tests, some smoke testing around creating and viewing posts in channels, scrolling up to view old posts should suffice.

Mana

3

Assignee

Agniva De Sarker

QA Assignee

Ogi Marusic

Reporter

Joe Wai Tye

Epic Link

Fix versions

Mattermost Team

Platform

Sprint

None

Labels

QA Testing Areas

Other (write in QA test steps)

GitHub Issue

None

Components

None
Configure