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.

Gdn_Activity Table

The VPS provider told me that mysql executes very slow query like:

SET timestamp=1382439712;
select count(a.ActivityID) as ActivityCount
from GDN_Activity a
join GDN_ActivityType t on a.ActivityTypeID = t.ActivityTypeID
where a.CommentActivityID is null
and (a.ActivityUserID = '4436'
or a.RegardingUserID = '4436')
and t.Public = '1';

First, I've added an index on GDN_Activity.ActivityType then my questions are:

What are these activities exactly? Why mysql executes over 50 of these queries in a second? Can i delete old records (years ago)? Can i disable them? (many questions....)
Keep in mind that this forum has over of 4 millions of impressions a month.

Thanks in advance for any tips.

Comments

  • Thanks!

  • it is worth testing the query on a backup. Remember to specify forumdb.

    grep is your friend.

  • x00x00 MVP
    edited November 2013

    -

    grep is your friend.

Sign In or Register to comment.