Review this query and the index that was added to 'fix' it.
The messages table has 500M rows across ~100k channels.
messages