D.O.A.
Well-known member
Hi there, no I'm not seeing anything when just running post ratings, there are queries related to that and other add-ons but they don't trigger anything with the slow query log, that I can see.Does that happen with my add on uninstalled and just the post ratings one running?
Code:
# User@Host: @ localhost []
# Query_time: 0.017634 Lock_time: 0.000090 Rows_sent: 10 Rows_examined: 5514
SET timestamp=1406034395;
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,
0 AS 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_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 = 0)
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 = 25304
group by pivot_pr.post_id
) pr on (pr.post_id = post.post_id)
WHERE post.thread_id = '25304'
AND (post.position >= 180 AND post.position < 190)
AND (post.message_state IN ('visible'))
ORDER BY post.position ASC, post.post_date ASC;
# Time: 140722 9:06:36