It is normal for this mod to add a lot of queries at the start of the day, and for it to quickly taper off.
Quote:
Technical
This hack adds 1 query to showthread for each user who posts in that page (or only 1 for the logged in user by configuration). In addition, the first time a member's post or profile is accessed during a day (GMT), 3 queries are performed to find that user's activity. By configuration, 1 query may be added to each page load to find the logged in user's "activity today". By configuration, 1 query may be added to each member profile view to find that member's "activity today".
|
There are several options that start off which add queries when turned on. They should all explain the query impact in the description.
In the default configuration, it is possible for this mod to add no queries when viewing a thread. This happens when posts for all of the posters on the displayed page have been previously viewed during the day, and none of those posters are the active user. On the other hand, if you view a thread page (of 25 posts), where each post is by a different user and noone has been viewing the board today, you could get 25x3=75 queries the first time you view the thread (but if you refresh it would drop to zero, because the activity is stored for each user from the first page load).
Activity is per user, not per post, so the typical senario is that after the configured "midnight" for the mod, people are viewing threads and the people that post a lot get their activity calculated and stored, using a lot of queries. After that, pages probably get 6 or 9 queries added as people view posts by less-frequent posters. Eventally, virtually all of the active users will have their activity already calculated and stored, and the mod will be adding only the single query to calculate the logged-in user's activity today in threads they posted in. Note that this is one of the reasons for the configurable day cycle: if you place the mod's midnight at the time where you have the lowest usage, not only will the day cycles seem more natural to the users, but the load spike after midnight will be placed where it won't matter as much.
I have made every effort to minimize SQL server load caused by this mod. Not only is activity stored for future page loads, but it is also stored for future posts on the same page, for example. It would be possible for me to do only 3 big queries every page load, but those 3 queries would create a larger and ongoing load than the way that I do it.