D.O.A.
Well-known member
Hi, we have a problem now and then with likes failing to be alerted in the navigation drop-down or recent likes page, we have post ratings installed and a pretty busy forum but I never see any errors in admin or the logs. Any ideas where to begin looking for the causes?
Example; above images only two of the three likes appeared as notifications. Not sure if it's mysql performance related? although we do get the odd long query from post ratings add-on and social groups, but the like above was not posted in groups.
Example; above images only two of the three likes appeared as notifications. Not sure if it's mysql performance related? although we do get the odd long query from post ratings add-on and social groups, but the like above was not posted in groups.
Code:
# User@Host: user[xxx] @ localhost []
# Query_time: 6.647592 Lock_time: 0.000061 Rows_sent: 4 Rows_examined: 28301
SET timestamp=1409967911;
SELECT post.*
,
bb_code_parse_cache.parse_tree AS message_parsed, bb_code_parse_cache.cache_version AS message_cache_version,
user.*, IF(user.username IS NULL, post.username, user.username) AS username,
user_profile.*,
signature_parse_cache.parse_tree AS signature_parsed, bb_code_parse_cache.cache_version AS signature_cache_version,
liked_content.like_date,
social_forum.logo_date,
social_forum.logo_width,
social_forum.logo_height,
social_forum.logo_crop_x,
social_forum.logo_crop_y,
social_forum.title AS social_forum_title,
social_forum_combination.cache_value AS secondary_social_forums
,(select sum(count_received) from dark_postrating_count where user_id = post.user_id and rating in (20,1,2)) as positive_rating_count
,(select sum(count_received) from dark_postrating_count where user_id = post.user_id and rating in (15,16,17,18,19,23,22,14,3)) as negative_rating_count
,
pr2.rating,
pr.*, post.post_id
FROM xf_post AS post
LEFT JOIN xf_bb_code_parse_cache AS bb_code_parse_cache ON
(bb_code_parse_cache.content_type = 'post' AND bb_code_parse_cache.content_id = post.post_id)
LEFT JOIN xf_user AS user ON
(user.user_id = post.user_id)
LEFT JOIN xf_user_profile AS user_profile ON
(user_profile.user_id = post.user_id)
LEFT JOIN xf_bb_code_parse_cache AS signature_parse_cache ON
(signature_parse_cache.content_type = 'signature' AND signature_parse_cache.content_id = post.user_id)
LEFT JOIN xf_liked_content AS liked_content
ON (liked_content.content_type = 'post'
AND liked_content.content_id = post.post_id
AND liked_content.like_user_id = 57274)
LEFT JOIN xf_social_forum AS social_forum ON
(social_forum.social_forum_id = user_profile.primary_social_forum_id)
LEFT JOIN xf_social_forum_combination AS social_forum_combination ON
(social_forum_combination.social_forum_combination_id = user_profile.social_forum_combination_id)
LEFT JOIN dark_postrating pr2 ON (post.post_id = pr2.post_id and pr2.user_id = 57274)
LEFT JOIN (
select
pivot_pr.post_id
, sum(case when pivot_pr.rating = 15 then 1 else 0 end) dark_postrating_15_count
, sum(case when pivot_pr.rating = 16 then 1 else 0 end) dark_postrating_16_count
, sum(case when pivot_pr.rating = 17 then 1 else 0 end) dark_postrating_17_count
, sum(case when pivot_pr.rating = 18 then 1 else 0 end) dark_postrating_18_count
, sum(case when pivot_pr.rating = 19 then 1 else 0 end) dark_postrating_19_count
, sum(case when pivot_pr.rating = 20 then 1 else 0 end) dark_postrating_20_count
, sum(case when pivot_pr.rating = 23 then 1 else 0 end) dark_postrating_23_count
, sum(case when pivot_pr.rating = 22 then 1 else 0 end) dark_postrating_22_count
, sum(case when pivot_pr.rating = 1 then 1 else 0 end) dark_postrating_1_count
, sum(case when pivot_pr.rating = 14 then 1 else 0 end) dark_postrating_14_count
, sum(case when pivot_pr.rating = 2 then 1 else 0 end) dark_postrating_2_count
, sum(case when pivot_pr.rating = 3 then 1 else 0 end) dark_postrating_3_count
from dark_postrating pivot_pr
use index (`post_id_rating`)
left join xf_post pivot_post on (pivot_pr.post_id = pivot_post.post_id)
where pivot_post.thread_id = 4
group by pivot_pr.post_id
) pr on (pr.post_id = post.post_id)
WHERE post.thread_id = '4'
AND (post.position >= 12430 AND post.position < 12440)
AND (post.message_state IN ('visible') OR (post.message_state = 'moderated' AND post.user_id = 57274))
ORDER BY post.position ASC, post.post_date ASC;
/usr/libexec/mysqld, Version: 5.5.39-log (MySQL Community Server (GPL) by Remi). started with:
Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock