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, session.view_date
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)LEFT OUTER JOIN xf_session_activity AS session ON post.user_id = session.user_id
WHERE post.post_id IN (705310, 704000, 703955, 703905, 703896, 703840, 703834, 703825, 703810, 703796, 703791, 703752, 703732, 703689, 703685, 703360, 703356, 703350, 703347, 703344, 703336, 703327, 703320, 703315, 703312, 703271, 703262, 703171, 703117, 703077, 621032, 620573, 612435, 603760, 603510, 603405, 603387, 603385, 603381, 603376, 603369, 603351, 597864, 597831, 596740, 596736, 596572, 592959, 592951, 592948, 591609, 591459, 591448, 591351, 591252, 591225, 591201, 590565, 590490, 590487, 590299, 590277, 589937, 588428, 588122, 588109, 587349, 586780, 586331, 585830, 585821, 585751, 585746, 585743, 585732, 585699, 585683, 585678, 585669, 585576, 585494, 585321, 585186, 585162, 584872, 584868, 584700, 584410, 584359, 584234, 584227, 584217, 584104, 583758, 583397, 583380, 583374, 583172, 583013, 583000, 582958, 582950, 582450, 582433, 582184, 582080, 582056, 581094, 580864, 580844, 580835, 580759, 580703, 580651, 579802, 579729, 579704, 579693, 578804, 578480, 578288, 578111, 578027, 578012, 577905, 577848, 577793, 577787, 577775, 577756, 577605, 577600, 577537, 577482, 577153, 577125, 577122, 577019, 576321, 576125, 576112, 576108, 576070, 575975, 575937, 574723, 574487, 574370, 574320, 574160, 574149, 574125, 574039, 574027, 573637, 573533, 573498, 573489, 553352, 472107, 471907, 428931, 428929, 428923, 428917, 428911, 428909, 428906, 428894, 428761, 428758, 428692, 428684, 428657, 428648, 428631, 428606, 428590, 428586, 428560, 428556, 428534, 428519, 428491, 428467, 426821, 426030, 426028, 426022, 425647, 425637, 425609, 425569, 425531, 425520, 425517, 425490, 425482, 425478, 425468)
Run Time: 0.004744
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 | | 200 | Using where |
SIMPLE | thread | eq_ref | PRIMARY,node_id_last_post_date,node_id_sticky_state_last_post | PRIMARY | 4 | krainamaystriv.post.thread_id | 1 | |
SIMPLE | node | eq_ref | PRIMARY | PRIMARY | 4 | krainamaystriv.thread.node_id | 1 | |
SIMPLE | user | eq_ref | PRIMARY | PRIMARY | 4 | krainamaystriv.post.user_id | 1 | |
SIMPLE | permission | eq_ref | PRIMARY | PRIMARY | 35 | const,const,krainamaystriv.thread.node_id | 1 | Using where |
SIMPLE | session | ref | PRIMARY | PRIMARY | 4 | krainamaystriv.post.user_id | 26 | |