SELECT 
  cscart_multi_decdiscussion_posts.*, 
  cscart_multi_decdiscussion_messages.message, 
  cscart_multi_decdiscussion_rating.rating_value 
FROM 
  cscart_multi_decdiscussion_posts 
  LEFT JOIN cscart_multi_decdiscussion_messages ON cscart_multi_decdiscussion_messages.post_id = cscart_multi_decdiscussion_posts.post_id 
  LEFT JOIN cscart_multi_decdiscussion_rating ON cscart_multi_decdiscussion_rating.post_id = cscart_multi_decdiscussion_posts.post_id 
WHERE 
  cscart_multi_decdiscussion_posts.thread_id = 25 
  AND cscart_multi_decdiscussion_posts.status = 'A' 
ORDER BY 
  cscart_multi_decdiscussion_posts.timestamp DESC 
LIMIT 
  0, 10

Query time 0.00045

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1.44"
    },
    "ordering_operation": {
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_multi_decdiscussion_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": 1,
            "rows_produced_per_join": 0,
            "filtered": "10.00",
            "index_condition": "(`vishalecarter_multi_dec`.`cscart_multi_decdiscussion_posts`.`thread_id` <=> 25)",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.02",
              "prefix_cost": "1.20",
              "data_read_per_join": "44"
            },
            "used_columns": [
              "post_id",
              "thread_id",
              "name",
              "timestamp",
              "user_id",
              "ip_address",
              "status"
            ],
            "attached_condition": "(`vishalecarter_multi_dec`.`cscart_multi_decdiscussion_posts`.`status` = 'A')"
          }
        },
        {
          "table": {
            "table_name": "cscart_multi_decdiscussion_messages",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "post_id"
            ],
            "key_length": "3",
            "ref": [
              "vishalecarter_multi_dec.cscart_multi_decdiscussion_posts.post_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.10",
              "eval_cost": "0.02",
              "prefix_cost": "1.32",
              "data_read_per_join": "2"
            },
            "used_columns": [
              "message",
              "post_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_multi_decdiscussion_rating",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "post_id"
            ],
            "key_length": "3",
            "ref": [
              "vishalecarter_multi_dec.cscart_multi_decdiscussion_posts.post_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.10",
              "eval_cost": "0.02",
              "prefix_cost": "1.44",
              "data_read_per_join": "1"
            },
            "used_columns": [
              "rating_value",
              "post_id"
            ]
          }
        }
      ]
    }
  }
}

Result

post_id thread_id name timestamp user_id ip_address status message rating_value
17 25 John 1383914729 0 10.7.7.93 A I’ve been using an iPhone 5 daily for the past year, and the iPhone 5s seems to feel exactly the same: the same curved edges, same dimensions, same everything. It's only an updated Home button and the new camera flash which make you realize that this is not an iPhone 5. Many people think that releasing the same design twice is bad, and there are others who realize that sometimes there's no need for change. Apple might want to understand that the competition is strong, and it needs to stay relevant. 3