SELECT
post.*
,
thread.*, thread.user_id AS thread_user_id, thread.username AS thread_username,
thread.post_date AS thread_post_date,
post.user_id, post.username, post.post_date,
node.title AS node_title, node.node_name,
user.*, IF(user.username IS NULL, post.username, user.username) AS username,
permission.cache_value AS node_permission_cache
FROM xf_post AS post
INNER JOIN xf_thread AS thread ON
(thread.thread_id = post.thread_id)
INNER JOIN xf_node AS node ON
(node.node_id = thread.node_id)
LEFT JOIN xf_user AS user ON
(user.user_id = post.user_id)
LEFT JOIN xf_permission_cache_content AS permission
ON (permission.permission_combination_id = 1
AND permission.content_type = 'node'
AND permission.content_id = thread.node_id)
WHERE post.post_id IN (93947, 89935, 83766, 83737, 80639, 80630, 79897, 79528, 79310, 78572, 78560, 78276, 78250, 78249, 78245, 78073, 78001, 77999, 77996, 77628, 77453, 77368, 77314, 76449, 76209, 76029, 75873, 75816, 75535, 75443, 75164, 73720, 73421, 71713, 69604, 69600, 63500, 63383, 62675, 62648, 62627, 62379, 62360, 62066, 61302, 61266, 61200, 61178, 61167, 61113, 60926, 60911, 57849, 57831, 57757, 57714, 684053, 684052, 684051, 57414, 57331, 57281, 57260, 57197, 53810, 53806, 53800, 53607, 53591, 53552, 53510, 53430, 53064, 52825, 52738, 52740, 52734, 52690, 52685)
Run Time: 0.002323
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | post | range | PRIMARY,thread_id_post_date,thread_id_position | PRIMARY | 4 | | 79 | Using where |
SIMPLE | user | eq_ref | PRIMARY | PRIMARY | 4 | psychopa_vanilla.post.user_id | 1 | |
SIMPLE | thread | eq_ref | PRIMARY,node_id_last_post_date,node_id_sticky_state_last_post | PRIMARY | 4 | psychopa_vanilla.post.thread_id | 1 | |
SIMPLE | node | eq_ref | PRIMARY | PRIMARY | 4 | psychopa_vanilla.thread.node_id | 1 | |
SIMPLE | permission | eq_ref | PRIMARY | PRIMARY | 35 | const,const,psychopa_vanilla.thread.node_id | 1 | Using where |
SELECT thread.*
,
user.*, IF(user.username IS NULL, thread.username, user.username) AS username,
node.title AS node_title, node.node_name,
post.message, post.attach_count,
NULL AS thread_read_date,
0 AS user_post_count,
permission.cache_value AS node_permission_cache,
last_post_user.avatar_date AS last_post_user_avatar_date, last_post_user.gravatar AS last_post_user_gravatar, last_post_user.gender AS last_post_user_gender
FROM xf_thread AS thread
LEFT JOIN xf_user AS user ON
(user.user_id = thread.user_id)
LEFT JOIN xf_node AS node ON
(node.node_id = thread.node_id)
LEFT JOIN xf_post AS post ON
(post.post_id = thread.first_post_id)
LEFT JOIN xf_permission_cache_content AS permission
ON (permission.permission_combination_id = 1
AND permission.content_type = 'node'
AND permission.content_id = thread.node_id)
LEFT JOIN xf_user AS last_post_user ON
(last_post_user.user_id = thread.last_post_user_id)
WHERE thread.thread_id IN (5636, 4515, 4497, 51890, 51889, 51888, 3849, 3848)
Run Time: 0.000731
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | thread | range | PRIMARY | PRIMARY | 4 | | 8 | Using where |
SIMPLE | user | eq_ref | PRIMARY | PRIMARY | 4 | psychopa_vanilla.thread.user_id | 1 | |
SIMPLE | node | eq_ref | PRIMARY | PRIMARY | 4 | psychopa_vanilla.thread.node_id | 1 | |
SIMPLE | post | eq_ref | PRIMARY | PRIMARY | 4 | psychopa_vanilla.thread.first_post_id | 1 | |
SIMPLE | permission | eq_ref | PRIMARY | PRIMARY | 35 | const,const,psychopa_vanilla.thread.node_id | 1 | Using where |
SIMPLE | last_post_user | eq_ref | PRIMARY | PRIMARY | 4 | psychopa_vanilla.thread.last_post_user_id | 1 | |
INSERT INTO xf_session_activity
(user_id, unique_key, ip, controller_name, controller_action, view_state, params, view_date, robot_key)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE
ip = VALUES(ip),
controller_name = VALUES(controller_name),
controller_action = VALUES(controller_action),
view_state = VALUES(view_state),
params = VALUES(params),
view_date = VALUES(view_date),
robot_key = VALUES(robot_key)
Params: 0, , , XenForo_ControllerPublic_Search, Member, valid, , 1714696422,
Run Time: 0.000091