SELECT thread.*
,
user.*, IF(user.username IS NULL, thread.username, user.username) AS username,
node.title AS node_title, node.node_name,
permission.cache_value AS node_permission_cache
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_permission_cache_content AS permission
ON (permission.permission_combination_id = 1
AND permission.content_type = 'node'
AND permission.content_id = thread.node_id)
WHERE thread.thread_id IN (5977, 5972, 5902, 5968, 5967, 5975, 5912, 5976, 5974, 5973, 5971, 5970, 5969, 3594, 5966, 5965)
Run Time: 0.000583
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | thread | range | PRIMARY | PRIMARY | 4 | | 16 | Using where |
SIMPLE | user | eq_ref | PRIMARY | PRIMARY | 4 | fifavnor_xf.thread.user_id | 1 | |
SIMPLE | node | eq_ref | PRIMARY | PRIMARY | 4 | fifavnor_xf.thread.node_id | 1 | |
SIMPLE | permission | eq_ref | PRIMARY | PRIMARY | 35 | const,const,fifavnor_xf.thread.node_id | 1 | Using where |
INSERT INTO `xf_search` (`search_results`, `result_count`, `search_type`, `search_query`, `search_constraints`, `search_order`, `search_grouping`, `user_results`, `warnings`, `user_id`, `search_date`, `query_hash`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Params: [["thread",5977],["thread",5972],["thread",5902],["thread",5968],["thread",5967],["thread",5975],["thread",5912],["thread",5976],["thread",5974],["thread",5973],["thread",5971],["thread",5970],["thread",5969],["thread",3594],["thread",5966],["thread",5965]], 16, recent-posts, , [], date, 0, , [], 0, 1715752208, 33d9f6025f582b3ef32bd337677090fe
Run Time: 0.006930