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 IN (148664) 
  AND cscart_discussion_posts.status = 'A' 
ORDER BY 
  cscart_discussion_posts.timestamp DESC 
LIMIT 
  0, 10

Query time 0.00051

JSON explain

{
  "query_block": {
    "select_id": 1,
    "read_sorted_file": {
      "filesort": {
        "sort_key": "cscart_discussion_posts.`timestamp` desc",
        "table": {
          "table_name": "cscart_discussion_posts",
          "access_type": "ref",
          "possible_keys": ["thread_id", "thread_id_2"],
          "key": "thread_id_2",
          "key_length": "6",
          "used_key_parts": ["thread_id", "status"],
          "ref": ["const", "const"],
          "rows": 5,
          "filtered": 100,
          "index_condition": "cscart_discussion_posts.`status` = 'A'",
          "attached_condition": "cscart_discussion_posts.thread_id <=> 148664 and cscart_discussion_posts.`status` <=> 'A'"
        }
      }
    },
    "table": {
      "table_name": "cscart_discussion_messages",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["post_id"],
      "ref": ["cscart_migrate.cscart_discussion_posts.post_id"],
      "rows": 1,
      "filtered": 100
    },
    "table": {
      "table_name": "cscart_discussion_rating",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["post_id"],
      "ref": ["cscart_migrate.cscart_discussion_posts.post_id"],
      "rows": 1,
      "filtered": 100
    }
  }
}

Result

post_id thread_id name timestamp user_id ip_address status email message rating_value
123851 148664 Jeff Miller 1480954200 1010141 71.46.242.170 A The good news is that I am very happy with the light I purchased (dark green, gooseneck, LED). I spent months looking for exactly this type of light. The product itself is solid, well built and well designed. I am especially pleased to be able to buy something made in the USA. That was a real plus. While it took a bit longer for delivery than expected that was alright. Getting what I wanted was far more important than a speedy delivery. And, for most people I expect mounting the light is a relatively straightforward affair, at least for most situations. Not for me. Because I live in coastal North Carolina hurricanes are a concern. The two mounting screws and anchors provided did not seem nearly sturdy enough to handle high winds given the large "sail effect" of the lamp shade and the leverage arising from the 29 inch gooseneck. And since I was mounting it in my brick veneer over what was a pre-existing light, installation was … interesting. I decided to use 2 1/4" x 5/16" lag bolts with metal anchors to mount the light. These were the largest bolts that would fit in the base mounting holes. This required hammer drilling into the brick, filling the hole with silicone adhesive/sealant, inserting the anchor along with wood wedges to secure it in place and then mounting the base using the lag bolts. I found that it was best to test the install first. Just drill one hole and mount the base with one bolt. Drill a guide hole through the other hole to ensure that everything will match up. If the holes don't match up exactly with the base it won't work. Trust me. Once the guide hole is done remove the base and complete the second hole. Assemble the lamp itself and prepare it to be mounted. The brief instructions for assembly were actually quite sufficient. Better if I'd paid a bit more attention and got the "O" ring installed the first time but it gave me practice in connecting the wires. Since the previous light fixture used black, white and green wiring it was easy to connect the proper wires for the outside power and switch. The red/black wires for the LED power supply were obviously connecting to the red/black wiring from the light. Mounting the LED power supply was easy as well. I used Teflon tape to connect the shade to the gooseneck as suggested. Note that the LED light itself screws onto the gooseneck so once the gooseneck is secure be sure to tighten the LED light itself. One issue was getting the lamp wires through the gooseneck. After several futile attempts at just pushing them through I ended up using a toilet snake since it is designed to go around curves. I "snaked" it through the gooseneck going from the lamp end to the base end. Tied some parachute cord to the snake and pulled the parachute cord back through the gooseneck. Removed the cord from the snake and taped the lamp wiring to the parachute cord. It was easy to pull it all the way back through the gooseneck. It was much better to pull the wiring using the parachute cord than it would have been with the snake. The snake had to twist and turn to get around the corners. The cord was a straight pull. One final issue was how to hold up the lamp while I made the wiring connections to the wall. I needed something about 78" high to hold the lamp end and a second something about 81" tall to hold the base end. You really need a helper who could hold the lamp while the wiring is connected. The lamp itself is surprisingly light so they don't have to be very strong. Unfortunately I didn't have a helper. So I scrounged around and used some empty 5 gallon buckets (with lids) and various pieces of wood for the lamp end and an extendable paint handle for the base end. It wasn't pretty but it worked. Got the wires connected, tested the lamp (and yeah, I turned off power at the circuit box before I messed with the wiring) to make sure it worked and went to complete the install. I used more silicone sealant/adhesive to securely seal the base to the brick and smoothed it using a wet finger (messy but it works). The biggest problem in finishing the install was getting the 5/16" lag bolts tight. The socket just barely fit over the bolt head and had to be pried off with a screwdriver when I needed to tighten the other bolt. And when the bolt was tight. I did the bolts alternating (tighten one most of the way, then the other and so forth) so there wouldn't be any tension in the base. It was hard to get the socket off but a bear to get it back on. With a bit of cussing and fussing it worked. The base is tight against the brick, secured with silicone against moisture and the lamp is solidly mounted. Most importantly it sits right over my grill so I can make BBQ all winter long and see what I'm doing. Thanks Barn Light. 5
123848 148664 DOMENIC 1455821520 0 104.34.133.75 A It would be most helpful, for commercial usage, if your drivers are industry standard, being capable of connecting to 120-277v. Your management and sales team are the best at their job. 5
123850 148664 Glade Ross 1426857960 0 216.177.235.42 A I haven't put on my two lights yet, but I've assembled them, and they look beautiful. 5
123849 148664 Joe S. 1422810120 0 173.8.195.198 A beautiful lamp with efficient LED gave us the perfect look for the addition to our 90 year old craftsman house 5
123852 148664 Elizabeth Silva 1416246120 0 76.90.72.125 A Beautiful light that is well made. Exactly what we wanted for our home. 5