New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow query in getParentsPosts #11734
Comments
Thanks for the detailed notes! Have shared with the team as well to see if they have additional insight. |
@vpecinka, thanks for the analysis! You're right that this is a hotspot in our current post loading strategy, and we're starting to pivot to exactly your suggestion, e.g.: 20f03f7#diff-3839c6aa88b8e4cfee8869d3da6d20ad. Longer term, the hope is to remove the need to load the root posts + threads in the first place, and truly load them on demand client-side when the RHS is opened. At the moment, we fetch the /entire/ thread for each post in the requested window! |
Hi, is this still an open issue? I am evaluating MM for a large group and it seems like loading channels with lots of messages is still slow. Thanks for any info! |
@jdnorthrup Which Mattermost server are you running? |
Team Edition 5.20.1
Db schema 5.20.0
mysql
Thx!
… On Apr 8, 2020, at 12:44 PM, Jason Blais ***@***.***> wrote:
@jdnorthrup Which Mattermost server are you running?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks! There had been a fix applied but it was on an earlier version. It wasn't directly related to this report, though, so at this point the issue is indeed open. How large of a group is it, if you don't mind me asking @jdnorthrup? |
An update on this issue generally - we're gradually getting closer to having it resolved. The initial fix for some aspects of it is already present in 5.22, the next part of the story is here mattermost/mattermost-webapp#5051 and then we will be quite close to completely eradicating the remaining unnecessary root post/thread loading. |
@jdnorthrup If you would like some assistance in configuring the server properly, please send me a direct message on the Mattermost community server (community.mattermost.com) at andy.ellman |
Hi,
as I posted comment in #6828 as the query is very slow in large channel. The query:
used in https://github.com/mattermost/mattermost-server/blob/e067272e16b962d04f9c83bb1cbd739ac1b6299c/store/sqlstore/post_store.go#L757
leads to filesort and very slow query in large channel (4mio+ posts). The EXPLAIN command tell:
Wouldn't be better to introduce "lazy parent posts" loading than this complex query? E.g. to display posts (rootId detects if parent exists) and then with 2nd bulk query get the parents posts for given LIMIT / OFFSET? Leads to more queries but cheaper ones...
The text was updated successfully, but these errors were encountered: