SELECT 
  company_descriptions.*, 
  companies.*, 
  vendor_plan_descriptions.plan, 
  seo_names.name as seo_name, 
  seo_names.path as seo_path, 
  vendor_ga_tracking_code, 
  vendor_fb_tracking_code, 
  AVG(discussion_rating.rating_value) AS average_rating, 
  CONCAT(
    companies.company_id, 
    '_', 
    IF (
      discussion_rating.thread_id, discussion_rating.thread_id, 
      '0'
    )
  ) AS company_thread_ids 
FROM 
  companies AS companies 
  LEFT JOIN company_descriptions AS company_descriptions ON company_descriptions.company_id = companies.company_id 
  AND company_descriptions.lang_code = 'en' 
  LEFT JOIN vendor_plan_descriptions ON companies.plan_id = vendor_plan_descriptions.plan_id 
  AND vendor_plan_descriptions.lang_code = 'en' 
  LEFT JOIN seo_names ON seo_names.object_id = 63 
  AND seo_names.type = 'm' 
  AND seo_names.dispatch = '' 
  AND seo_names.lang_code = 'en' 
  LEFT JOIN discussion as discussionA ON discussionA.object_id = companies.company_id 
  AND discussionA.object_type = 'M' 
  LEFT JOIN discussion_posts ON discussion_posts.thread_id = discussionA.thread_id 
  AND discussion_posts.status = 'A' 
  LEFT JOIN discussion_rating ON discussionA.thread_id = discussion_rating.thread_id 
  AND discussion_rating.post_id = discussion_posts.post_id 
WHERE 
  companies.company_id = 63

Query time 0.00125

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "2.76"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "companies",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "company_id"
          ],
          "key_length": "4",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "14K"
          },
          "used_columns": [
            "company_id",
            "status",
            "company",
            "lang_code",
            "address",
            "city",
            "state",
            "country",
            "zipcode",
            "email",
            "phone",
            "url",
            "storefront",
            "secure_storefront",
            "entry_page",
            "redirect_customer",
            "countries_list",
            "timestamp",
            "shippings",
            "logos",
            "request_user_id",
            "request_account_name",
            "request_account_data",
            "plan_id",
            "stripe_connect_account_id",
            "identifier_facebook_pixel",
            "featured_products",
            "sd_ga_tracking_code",
            "paypal_commerce_platform_account_id",
            "tagline",
            "url_facebook",
            "url_instagram",
            "url_twitter",
            "url_pinterest",
            "announcement",
            "shippo_api_token",
            "shippo_carrier",
            "shippo_service_type",
            "vendor_ga_tracking_code",
            "vendor_fb_tracking_code",
            "custom_domain",
            "custom_domain_status",
            "taxjar_key",
            "taxjar_export_statuses",
            "taxjar_export_csv_data",
            "ag_hide_city",
            "updated_timestamp",
            "suspend_date",
            "grace_period_start",
            "last_time_suspended",
            "last_debt_notification_time",
            "tax_number",
            "stripe_connect_account_type",
            "registered_from_storefront_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "company_descriptions",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "company_id",
            "lang_code"
          ],
          "key_length": "10",
          "ref": [
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "company_id",
            "lang_code",
            "company_description",
            "terms",
            "subdomain_colors",
            "i18n_company",
            "i18n_address",
            "i18n_city"
          ]
        }
      },
      {
        "table": {
          "table_name": "vendor_plan_descriptions",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "plan_id",
            "lang_code"
          ],
          "key_length": "10",
          "ref": [
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "plan_id",
            "lang_code",
            "plan"
          ]
        }
      },
      {
        "table": {
          "table_name": "seo_names",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "dispatch"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "object_id",
            "type",
            "dispatch",
            "lang_code"
          ],
          "key_length": "206",
          "ref": [
            "const",
            "const",
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.85",
            "eval_cost": "0.10",
            "prefix_cost": "0.95",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "name",
            "object_id",
            "type",
            "dispatch",
            "path",
            "lang_code"
          ]
        }
      },
      {
        "table": {
          "table_name": "discussionA",
          "access_type": "const",
          "possible_keys": [
            "object_id"
          ],
          "key": "object_id",
          "used_key_parts": [
            "object_id",
            "object_type"
          ],
          "key_length": "6",
          "ref": [
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "0.67",
            "eval_cost": "0.10",
            "prefix_cost": "1.72",
            "data_read_per_join": "24"
          },
          "used_columns": [
            "thread_id",
            "object_id",
            "object_type"
          ]
        }
      },
      {
        "table": {
          "table_name": "discussion_posts",
          "access_type": "ref",
          "possible_keys": [
            "thread_id",
            "thread_id_2"
          ],
          "key": "thread_id_2",
          "used_key_parts": [
            "thread_id",
            "status"
          ],
          "key_length": "6",
          "ref": [
            "goimagine.discussionA.thread_id",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "0.25",
            "eval_cost": "0.18",
            "prefix_cost": "2.15",
            "data_read_per_join": "787"
          },
          "used_columns": [
            "post_id",
            "thread_id",
            "status"
          ]
        }
      },
      {
        "table": {
          "table_name": "discussion_rating",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY",
            "thread_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "post_id"
          ],
          "key_length": "3",
          "ref": [
            "goimagine.discussion_posts.post_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.44",
            "eval_cost": "0.18",
            "prefix_cost": "2.76",
            "data_read_per_join": "28"
          },
          "used_columns": [
            "rating_value",
            "post_id",
            "thread_id"
          ],
          "attached_condition": "<if>(is_not_null_compl(discussion_rating), (`goimagine`.`discussion_rating`.`thread_id` = `goimagine`.`discussionA`.`thread_id`), true)"
        }
      }
    ]
  }
}

Result

company_id lang_code company_description terms subdomain_colors i18n_company i18n_address i18n_city status company address city state country zipcode email phone url storefront secure_storefront entry_page redirect_customer countries_list timestamp shippings logos request_user_id request_account_name request_account_data plan_id stripe_connect_account_id identifier_facebook_pixel featured_products sd_ga_tracking_code paypal_commerce_platform_account_id tagline url_facebook url_instagram url_twitter url_pinterest announcement shippo_api_token shippo_carrier shippo_service_type vendor_ga_tracking_code vendor_fb_tracking_code custom_domain custom_domain_status taxjar_key taxjar_export_statuses taxjar_export_csv_data ag_hide_city updated_timestamp suspend_date grace_period_start last_time_suspended last_debt_notification_time tax_number stripe_connect_account_type registered_from_storefront_id plan seo_name seo_path average_rating company_thread_ids
63 en <p class="text-center"><b>Who knew an ankle bracelet would bring about the birth of McKean Creations?</b> </p> <p class="text-center"><b>My love for stones, beads, jewelry and accessories started as a child and never went away. I was quite the fashion statement in my pop beads of many colors and my friendship bracelets made of string in my early years. Later, in my teenage years, it was anklets, barefoot sandals and flowers in the hair. As an adult, I worked in a department store in the jewelry and accessories department and my jewelry stash grew. In 2006, while in Santa Cruz I decided to buy an ankle bracelet. Maybe I was trying to recapture my youth, I don’t know, but I couldn’t find one I liked, and more importantly, one that would fit. As soon as I returned home, I relearned how to make my own, and soon my coworkers and friends were all wanting to buy one for themselves. This led to creating earrings and bracelets which led to an invitation to sell at a large local season long craft fair. McKean Creations was born. Over a decade later I am still designing and growing in my knowledge of a variety of jewelry styles, learning more ways to create beautiful, comfortable and durable jewelry that become special keepsakes for my customers. It’s such a pleasure to see the happiness each piece brings them.</b> </p> <p class="text-center"><b>I feel from casual to elegant, jewelry should be a reflection of your style, so at McKean Creations I offer an eclectic array of custom designed jewelry handmade by artisan Marcia McKean (that’s me). You will find unique handcrafted jewelry that is great for any occasion, either for yourself or as a gift. Browse through my Goimagine store, pick out your favorites, then treat yourself or a loved one to that beaded indulgence you so deserve. I hope you enjoy wearing it as much as I enjoy the creation.</b> </p> <p class="text-center"><b>Many Blessings,</b> </p> <p class="text-center"><b>Marcia</b> </p> <p><strong>Returns and Exchanges<br></strong></p> <p>At McKean Creations, your satisfaction with your purchase is very important. If for some reason you need to return your item, please contact me within 5 days of receipt to make return/refund arrangement. Items can be returned within 10 days of receipt. Items must be in original condition, not altered or worn. Items must be packaged securely to ensure safe return. Full price of item less shipping fees will be refunded. Return shipping fee afforded by buyer. Returned item must be shipped with tracking.<br></p> <p><strong>I gladly accept returns, exchanges and cancellations<br></strong></p> <p>Contact me within: 5 days of delivery</p> <p>Ship items back within: 10 days of delivery</p> <p>Request a cancellation within: 1 hour of purchase if item has not already been mailed.<br></p> <p><strong>The following items cannot be returned or exchanged<br></strong></p> <p>Because of the nature of these items, unless they arrive defective, I can't accept returns for:</p> <ul><li>Custom or personalized orders</li><li>Intimate items (for health/hygiene reasons) such as pierced earrings</li></ul> <p><strong>Questions about your purchase?</strong><br></p> <p>Please contact me if you have any problems with your purchase.</p> <p><br></p> <p><strong>Payment<br></strong></p> <p>We accept credit card payments through Stripe. Goimagine nor McKean Creations have access to your credit card information.</p> <p><br></p> <p><strong>Shipping<br></strong></p> <p><strong>Important Announcement - Though we still mail your purchase within our normal time frame, mail is taking longer than the Post Office estimated times listed below to arrive at their destination. Some packages are taking 2-3 weeks and some are arriving within scheduled times, depending on which sorting facility the package is routed through. </strong><br></p> <p>Currently we are shipping in the United States only. We use the United States Postal System's (USPS) Priority Flat rate and USPS First class Mail with tracking. We ship to the address listed on your Goimagine account, so please make sure it is updated and correct (if checking out as a guest, we will use the address provided with the order). Your purchase will be shipped in 3-5 business days of cleared payment. If additional time is needed, you will be contacted. Once mailed, Priority Flat Rate packages normally will take 2-3 days to reach their destination and USPS First Class Mail 4-7 days, but this time line cannot be guaranteed once the package has been received by the post office. So far, packages have arrived and been pretty much on time. There's the occasional package that decides to take the more scenic route.<br><br></p> <p><br></p> <p><strong>Additional Policies and FAQS<br></strong></p> <p>Notice - The items in this shop are not intended for use by children under the age of 10. If children are wearing jewelry, it should be under strict supervision.</p> <p><br></p> <p><strong>Privacy Faqs<br></strong></p> <p>I will only use your shipping, billing and contact information to communicate with you about your order, to fulfill your order, and if necessary, for legal reasons (like paying taxes).<strong><br></strong></p> <p><strong><br></strong><br></p> <p><br></p> <p><br></p> <ul><br><br><br><br></ul> {"tmenu_style":"V","default_colors":"N","link_color":"#007d89","label_color":"#00a0af","icon_color":"#00a0af","main_btn_color":"#6dd1d6","branded_text_color":"#00a0af","vbp_1_url":"","vbp_2_url":"","vbp_3_url":"","vba_1_url":"","vba_2_url":"","vba_3_url":""} McKean Creations 5842 Olive Ranch Rd Granite Bay A McKean Creations 5842 Olive Ranch Rd Granite Bay CA US 95746 mckeancreations@gmail.com none Y 1584472566 0 a:4:{s:14:"company_fields";a:2:{i:37;s:6:"Marcia";i:38;s:6:"McKean";}s:15:"admin_firstname";s:6:"Marcia";s:14:"admin_lastname";s:6:"McKean";s:6:"fields";a:0:{}} 4 acct_1GNpLzEiI5MQMFbc 21214,26915,23069,32824,35853,45480,23122,37439 UA-148138080-2 UA-148138080-2 A {"items_per_file":"2500","time_from":"","time_to":""} N 0 0 0 0 0 S All-Star Plan mckeancreations 5.0000 63_14