SELECT 
  cscart_discussion_posts.*, 
  cscart_discussion_messages.message, 
  cscart_discussion_rating.rating_value 
FROM 
  cscart_discussion_posts 
  LEFT JOIN cscart_discussion_messages ON cscart_discussion_messages.post_id = cscart_discussion_posts.post_id 
  LEFT JOIN cscart_discussion_rating ON cscart_discussion_rating.post_id = cscart_discussion_posts.post_id 
WHERE 
  cscart_discussion_posts.thread_id = 3469 
  AND cscart_discussion_posts.status = 'A' 
ORDER BY 
  cscart_discussion_posts.timestamp DESC 
LIMIT 
  0, 10

Query time 0.00057

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4.32"
    },
    "ordering_operation": {
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_discussion_posts",
            "access_type": "ref",
            "possible_keys": [
              "thread_id",
              "thread_id_2"
            ],
            "key": "thread_id",
            "used_key_parts": [
              "thread_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 3,
            "rows_produced_per_join": 0,
            "filtered": "10.00",
            "index_condition": "(`danishecarter_latest`.`cscart_discussion_posts`.`thread_id` <=> 3469)",
            "cost_info": {
              "read_cost": "3.00",
              "eval_cost": "0.06",
              "prefix_cost": "3.60",
              "data_read_per_join": "134"
            },
            "used_columns": [
              "post_id",
              "thread_id",
              "name",
              "timestamp",
              "user_id",
              "ip_address",
              "status"
            ],
            "attached_condition": "(`danishecarter_latest`.`cscart_discussion_posts`.`status` = 'A')"
          }
        },
        {
          "table": {
            "table_name": "cscart_discussion_messages",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "post_id"
            ],
            "key_length": "3",
            "ref": [
              "danishecarter_latest.cscart_discussion_posts.post_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.30",
              "eval_cost": "0.06",
              "prefix_cost": "3.96",
              "data_read_per_join": "7"
            },
            "used_columns": [
              "message",
              "post_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_discussion_rating",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "post_id"
            ],
            "key_length": "3",
            "ref": [
              "danishecarter_latest.cscart_discussion_posts.post_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.30",
              "eval_cost": "0.06",
              "prefix_cost": "4.32",
              "data_read_per_join": "4"
            },
            "used_columns": [
              "rating_value",
              "post_id"
            ]
          }
        }
      ]
    }
  }
}

Result

post_id thread_id name timestamp user_id ip_address status message rating_value
94 3469 Richard 1484309040 0 5f68c2c5 A I already had an old iPad when I decided to get this. Interesting at first, it became clear that this tablet is in some areas not as good as an iPad. I’m talking about battery life, the responsiveness of user interface, and performance in the apps and games. One thing it excels over the iPad is the camera, it’s much better than on iPad. My personal score for this tablet is 6/10. Good for those who never had a tablet or iPad before, not so much for everyone else. 3
92 3469 James 1484308980 0 5f68c2c5 A I would never anticipate that Nokia will make an android tablet one day. But they did. I bought it, tried it, it’s a typical 8-inch android tablet with a square-ish aspect ratio. Don’t expect miracles from it, it will deliver none. Specs are OK, the software is a bit of a different story though. After a month of use, it became a bit sluggish, and I had to install a cleaner app. I think Nokia can do better than that. 3
93 3469 Jeremy 1484308980 0 5f68c2c5 A I left it on the driver seat of my car and accidentally sat on it. It broke in half and the service center refused to exchange it for a new one, telling me something about a “non-warranty case.” I’ll stick to a notebook and pen until they begin to manufacture something sturdier. 2