Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Discussion Overview | Slowness on MySQL 5.7


Just upgraded MySQL on my local dev environment to v5.7.
First thing I noticed was that the forum home page (discussion overview) takes over 1 minute to load (~2 seconds using MySQL 5.6).
Diving further into it I found the following query to be slow, also when run directly on the mysql command line:

select d2.*, w.UserID as `WatchUserID`, w.DateLastViewed as `DateLastViewed`, w.Dismissed as `Dismissed`, w.Bookmarked as `Bookmarked`, w.CountComments as `CountCommentWatch`, w.Participated as `Participated` from GDN_Discussion d join GDN_Discussion d2 on d.DiscussionID = d2.DiscussionID left join GDN_UserDiscussion w on w.DiscussionID = d2.DiscussionID and w.UserID = 8 order by d.DateLastComment desc limit 40;

I believe the query is fine, indexes are in place where they should, and this is probably more of a MySQL issue.
However, if anyone has had the same issue, I would be happy to hear about your approaches to fixing the issue.

  • using Vanilla 2.5.1
  • GDN_Discussion: 2669 records
  • GDN_UserDiscussion: 112208 records


Sign In or Register to comment.