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 = 4266 
  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 = 4266

Query time 0.00109

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "2.86"
    },
    "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.88",
            "eval_cost": "0.10",
            "prefix_cost": "0.98",
            "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.74",
            "eval_cost": "0.10",
            "prefix_cost": "1.82",
            "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.25",
            "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.86",
            "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
4266 en <p>Hello,&nbsp;</p> <p>I'm Latara Deniece and I've been indulging in knitwear for profit for 10 years. It has always been the forefront of my arts and crafts journey, picking up on knitting at age 5. I was taught by my mother, who shared novice projects with me such as hats, scarves, pillows and such. I was always fascinated by crochet stitches but, never successfully learned until I reached adulthood and discovered YouTube! I quickly picked up the craft and started selling my handcrafted wares at artist markets, fares and festivals to supplement my income as well as fulfill my desire to be a fashion designer. From there, I learned to read stitch diagrams, read and even design my own patterns, and finally construct and reproduce my own designs. I can't wait to make available, everything I've learned to make since embarking on this maker's journey.</p> <p>All items contained in this store are hand crafted with 100% cellulose fibers, mainly cotton. Other fibers will may include bamboo, hemp, and cellulose blends or possible biodegradable blended fibers. I strive to be economically and socially conscious of how my products will sustain livelihood from start to end of purpose.</p> <p>Cancelations</p><p>Cancelations will be accepted 24 hours after an order has been placed. Alterations will be accepted 5 business days after shipment arrival. I do not accept Returns. Contact me for more info regarding Cancelations/Alterations</p> <p>Shipments</p> <p>Premade/Selected Style items that are stocked and ready to ship, require an estimated time of 3-7 days. Custom items require a 14-21 days estimated time.</p><p>I process your order once a Successful Payment Confirmation is complete. You will receive notification if our Inventory Selection cannot accommodate the Shipping Time for custom orders, and an Extended Time Allowance will be permitted with a follow up email which will require your acknowledgement of a change in your Shipping Time.&nbsp;</p><p>Care Instructions&nbsp;</p> <p>All fibers are pre washed and line dried before garment construction, and thoroughly inspected before packaging and shipment. This insures that 1. I am handling sanitized/sterilized fibers. 2. I have an idea of how the garment will adhere to garment care such as wash and wear.&nbsp;</p> <p>I suggest all items to be hand washed, towel rolled to remove excess water, and laid flat to dry. You may also opt to machine wash and dry in a garment/lingerie bag (or pillow case) on your most gentle cycles (delicate wash/low heat air fluff) and be sure that garments are completely dried and stored properly.</p> <p>A simple lint roller will loosen and remove most lint pills that may occur with excessive wear. You may opt for a pumice stone to remove pills but cotton is usually super soft and ply can halo with hard rubbing. Halos can carefully be removed with manicure or trimming shears. For more detailed tips on how to care for cotton, visit my post:</p> <p><a href="https://elledeeinndesigns.blogspot.com/2021/04/the-craft-of-care-cotton.html">https://elledeeinndesigns.blog...</a></p> <p><br></p> <p>Thank you so much for supporting the time, effort, energy, and beauty of supporting a handcrafted, eco conscious knitwear production!</p> {"tmenu_style":"V","default_colors":"N","link_color":"#351c75","label_color":"#674ea7","icon_color":"#674ea7","main_btn_color":"#9900ff","branded_text_color":"#351c75","vbp_1_url":"","vbp_2_url":"","vbp_3_url":"","vba_1_url":"","vba_2_url":"","vba_3_url":""} Elle Deeinn Designs 695 GA-49 Milledgeville A Elle Deeinn Designs 695 GA-49 Milledgeville GA US 31061 teebaby0131@gmail.com none Y 1636383285 0 1 acct_1JtcsaEoMcd4bUc2 Optimizing the Approach of How Knitwear is Worn https://www.facebook.com/elle.dienne.7 https://instagram.com/elle_crochet?utm_medium=copy_link https://mobile.twitter.com/elle_crochet https://pin.it/cjqIse4 <p>Welcome to my shop! Thanks for stopping by, I've got some great deals on exclusive knitwear pieces. Be sure to keep up, I'll be including Fall and Winter knitwear soon!</p> <p>All items contained in this store are hand crafted with 100% cellulose fibers, mainly cotton. Other fibers will may include bamboo, hemp, and cellulose blends or possible biodegradable blended fibers.&nbsp;<br></p> <p>All sample pieces are done in a standard US size guide system. I suggest that when placing your order, refer to a current top size or bra size that you wear. My sizing start at extra small up to extra large.</p><p>&nbsp;I do offer custom orders, just message me with your specific measurements in accordance with the style of the garment listed. For example: tops may require to know bust, under bust, and waist or upper arm measurements. I will make contact via messaging to update buyer on final measurements before shipping and handling process is completed, but will still ship out orders if no response is made. Please see terms and conditions concerning cancelations and exchanges.&nbsp;</p> <p>Thank you for stopping by and please be sure to check out my social media links to stay connected with updates, sales, deals, and new arrivals. Feel free to tag me in any post wearing my creation and receive a special discount offer!</p> <p><br></p> <p>-Edi</p> A N 0 0 0 0 0 S Starter Plan elledeeinndesigns 4266_0