Quote:
Originally Posted by lasto
what - this hack adds 32 queries when viewing posts - if so then it aint worth installing then.
|
As I said in the post immediately above yours, it's on install. At view, it's two queries plus 2 per user who hasn't had activity updated that day. The dynamic of this is a max of 32 queries per page, which will happen a bit after midnight when the old data is discarded, and 2 queries per page the rest of the day.
I am open to suggestions as to how to further reduce the number of queries. Currently, to find the activity for a user, I need to query the visitlog for visitation data, query the post table to find out when they posted, and query the user table to store the activity information so that it won't be calculated again. The only possibility I can think of is if I can do all the activity for the whole page in two queries and hope that the cost of these two queries is little enough to make them every load instead of storing the results to avoid performing the process over and over; however, I am no SQL wizzard and figuring out how to reduce the process to a flat 2 queries was a stretch of my ability.