SELECT 
  products.*, 
  product_descriptions.*, 
  MIN(
    IF(
      product_prices.percentage_discount = 0, 
      product_prices.price, 
      product_prices.price - (
        product_prices.price * product_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      products_categories.link_type = 'M'
    ) THEN CONCAT(
      products_categories.category_id, 
      'M'
    ) ELSE products_categories.category_id END 
    ORDER BY 
      categories.storefront_id IN (0, 1) DESC, 
      (
        products_categories.link_type = 'M'
      ) DESC, 
      products_categories.category_position ASC, 
      products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  company_descr.i18n_company as company_name, 
  cd.terms, 
  seo_names.name as seo_name, 
  seo_names.path as seo_path, 
  company_descriptions.company_description, 
  discussion.type as discussion_type 
FROM 
  products 
  LEFT JOIN product_prices ON product_prices.product_id = products.product_id 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN product_descriptions ON product_descriptions.product_id = products.product_id 
  AND product_descriptions.lang_code = 'en' 
  LEFT JOIN company_descriptions as company_descr ON company_descr.company_id = products.company_id 
  AND company_descr.lang_code = 'en' 
  LEFT JOIN companies as companies ON companies.company_id = products.company_id 
  INNER JOIN products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN categories ON categories.category_id = products_categories.category_id 
  AND categories.storefront_id IN (0, 1) 
  AND (
    categories.usergroup_ids = '' 
    OR FIND_IN_SET(0, categories.usergroup_ids) 
    OR FIND_IN_SET(1, categories.usergroup_ids)
  ) 
  AND (
    products.usergroup_ids = '' 
    OR FIND_IN_SET(0, products.usergroup_ids) 
    OR FIND_IN_SET(1, products.usergroup_ids)
  ) 
  AND categories.status IN ('A', 'H') 
  AND products.status IN ('A', 'H') 
  LEFT JOIN product_popularity as popularity ON popularity.product_id = products.product_id 
  LEFT JOIN company_descriptions AS cd ON cd.company_id = products.company_id 
  AND cd.lang_code = 'en' 
  LEFT JOIN seo_names ON seo_names.object_id = 83388 
  AND seo_names.type = 'p' 
  AND seo_names.dispatch = '' 
  AND seo_names.lang_code = 'en' 
  LEFT JOIN company_descriptions AS company_descriptions ON company_descriptions.company_id = products.company_id 
  AND company_descriptions.lang_code = 'en' 
  LEFT JOIN discussion ON discussion.object_id = products.product_id 
  AND discussion.object_type = 'P' 
WHERE 
  products.product_id = 83388 
  AND (
    companies.status IN ('A') 
    OR products.company_id = 0
  ) 
GROUP BY 
  products.product_id

Query time 0.00166

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "6.92"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "products",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "status",
              "idx_company_id",
              "idx_usergroup_ids"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "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": "4K"
            },
            "used_columns": [
              "product_id",
              "product_code",
              "product_type",
              "status",
              "company_id",
              "list_price",
              "amount",
              "weight",
              "length",
              "width",
              "height",
              "shipping_freight",
              "low_avail_limit",
              "timestamp",
              "updated_timestamp",
              "usergroup_ids",
              "is_edp",
              "edp_shipping",
              "unlimited_download",
              "tracking",
              "free_shipping",
              "zero_price_action",
              "is_pbp",
              "is_op",
              "is_oper",
              "is_returnable",
              "return_period",
              "avail_since",
              "out_of_stock_actions",
              "localization",
              "min_qty",
              "max_qty",
              "qty_step",
              "list_qty_count",
              "tax_ids",
              "age_verification",
              "age_limit",
              "options_type",
              "exceptions_type",
              "details_layout",
              "shipping_params",
              "weight_lbs",
              "weight_oz",
              "product_tax_code",
              "deleted_at",
              "archived_at",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "popularity",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "total"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "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": "32"
            },
            "used_columns": [
              "product_id",
              "total"
            ]
          }
        },
        {
          "table": {
            "table_name": "cd",
            "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",
              "terms"
            ]
          }
        },
        {
          "table": {
            "table_name": "product_prices",
            "access_type": "ref",
            "possible_keys": [
              "usergroup",
              "product_id",
              "lower_limit",
              "usergroup_id"
            ],
            "key": "product_id",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.47",
              "eval_cost": "0.10",
              "prefix_cost": "0.57",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(product_prices), ((`goimagine`.`product_prices`.`lower_limit` = 1) and (`goimagine`.`product_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "product_descriptions",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "product_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "lang_code"
            ],
            "key_length": "11",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.63",
              "eval_cost": "0.10",
              "prefix_cost": "1.29",
              "data_read_per_join": "5K"
            },
            "used_columns": [
              "product_id",
              "lang_code",
              "product",
              "shortname",
              "short_description",
              "full_description",
              "meta_keywords",
              "meta_description",
              "search_words",
              "page_title",
              "age_warning_message",
              "promo_text",
              "cls_stop_words",
              "how_its_made",
              "custom_header"
            ]
          }
        },
        {
          "table": {
            "table_name": "company_descr",
            "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.86",
              "eval_cost": "0.10",
              "prefix_cost": "2.26",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "i18n_company"
            ]
          }
        },
        {
          "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.68",
              "eval_cost": "0.10",
              "prefix_cost": "3.04",
              "data_read_per_join": "14K"
            },
            "used_columns": [
              "company_id",
              "status"
            ],
            "attached_condition": "<if>(found_match(companies), ((`goimagine`.`companies`.`status` = 'A') or false), true)"
          }
        },
        {
          "table": {
            "table_name": "products_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 5,
            "rows_produced_per_join": 5,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.25",
              "eval_cost": "0.50",
              "prefix_cost": "4.79",
              "data_read_per_join": "80"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "table": {
            "table_name": "categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "goimagine.products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "1.25",
              "eval_cost": "0.03",
              "prefix_cost": "6.54",
              "data_read_per_join": "670"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`goimagine`.`categories`.`storefront_id` in (0,1)) and ((`goimagine`.`categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`goimagine`.`categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`goimagine`.`categories`.`usergroup_ids`))) and (`goimagine`.`categories`.`status` in ('A','H')))"
          }
        },
        {
          "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.22",
              "eval_cost": "0.03",
              "prefix_cost": "6.79",
              "data_read_per_join": "434"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.04",
              "eval_cost": "0.03",
              "prefix_cost": "6.86",
              "data_read_per_join": "444"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "company_description"
            ]
          }
        },
        {
          "table": {
            "table_name": "discussion",
            "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.04",
              "eval_cost": "0.03",
              "prefix_cost": "6.92",
              "data_read_per_join": "6"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id product_code product_type status company_id list_price amount weight length width height shipping_freight low_avail_limit timestamp updated_timestamp usergroup_ids is_edp edp_shipping unlimited_download tracking free_shipping zero_price_action is_pbp is_op is_oper is_returnable return_period avail_since out_of_stock_actions localization min_qty max_qty qty_step list_qty_count tax_ids age_verification age_limit options_type exceptions_type details_layout shipping_params weight_lbs weight_oz product_tax_code deleted_at archived_at position lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text cls_stop_words how_its_made custom_header price category_ids popularity company_name terms seo_name seo_path company_description discussion_type
83388 P A 71 59.95 1 0.044 0 0 0 0.00 0 1621137573 1672615712 0 N N N D N R N N N Y 10 0 N 0 0 0 0 N 0 P F a:5:{s:16:"min_items_in_box";i:0;s:16:"max_items_in_box";i:0;s:10:"box_length";i:0;s:9:"box_width";i:0;s:10:"box_height";i:0;} 0.000 0.700 2147483647 en Rainbow Bag <p>Rainbows are the perfect symbol of hope. Whether it's to show off your pride or you just love rainbows, this beautiful handbag will a great addition to your life. It's ideal for when you want something small, just&nbsp; big enough for a phone, small wallet, and keys.&nbsp;</p> <p>For lining, I will send fabric choices based on your color choice within 1 week of order; buyer will have 3 days to give approval. If no response is received within the timeframe, I will go with my best selections based on yarn choice. Please remember, all screens read color differently and colors may vary in person.</p> <p>Want a little more? Add a matching keychain as well!</p> <p>Please see&nbsp;<b>How It's Made</b>&nbsp;for more information regarding size and materials used.&nbsp;</p> rainbow, bag, bags, rainbow bag, rainbow bags, pride, glbtq, glbtqia+, glbqia, pride month, trans, transexual, bi, bisexual, nonbinary, pan, pansexual, ace, asexual, lesbian, gay, crochet, crochet bag, crochet bags Rainbows are the perfect symbol of hope. Whether it's to show off your pride or you just love rainbows, this beautiful handbag will a great addition to your life. It's ideal for when you want something small, just fitting big enough for a phone, small wal rainbow, bag, bags, rainbow bag, rainbow bags, pride, glbtq, glbtqia+, glbqia, pride month, trans, transexual, bi, bisexual, nonbinary, pan, pansexual, ace, asexual, lesbian, gay, crochet, crochet bag, crochet bags Rainbow Bag <p>Item will ship in 3-4 weeks.</p> <p><b>Sizing:<br></b></p> <p>Bag Outside <br>Height: 7.5 inches<br>Width: 7.5 inches</p> <p>Bag Inside w/Lining<br>Height: 7 inches<br>Width: 6 inches</p> <p>Strap: 17 inches<br></p> <p>Please allow some size variance as each item is made to order.&nbsp;<br></p> <p><b>Materials:</b></p> <ul><li>Acrylic Yarn</li><li>Cotton Lining</li></ul> <p><b>Pattern by:&nbsp;</b>HookedMe</p> <p>____________________________</p> <p>Items are made in a pet-friendly and smoke-free home.&nbsp;&nbsp;</p> <p>Actual colors may vary due to how computer/device screens have different capabilities to display colors and that everyone sees these colors differently. I try to edit our photos to show all of my products as life-like as possible, but please understand the actual color may vary slightly from your monitor</p> 59.95000000 14M,36,3773,3774,2565 4512 Sowers Creations <p><b>Processing Time</b><br></p> <p>All items are made-to-order. While time needed to prepare orders for shipping averages between 2-3 weeks, please see individual listings for specific details. Please also check the store announcements for up-to-date information on delays.&nbsp;</p> <p><br></p> <p><b>Returns, Exchanges, or Cancellations</b></p> <p>Due to the nature of custom or personalized items, items cannot be returned/exchanged unless the item was received damaged or there was a mistake on my part.&nbsp;</p> <ul><li>Buyers must contact me within <b>7 days of delivery</b>.</li><li>Items must be shipped back within <b>14 days of delivery</b> if looking for a replacement.&nbsp;</li><li>If the item was damaged, I do request a photo of the packing and the item to show damage.&nbsp;</li></ul> <p><br></p> <p><b>For Items Returned to Sender due to incorrect or insufficient address</b></p> <ul><li>Buyer will be charged for the new shipping label. Since all items are custom made, I will not refund items.&nbsp;</li></ul> <p><br></p> <p><b>For Cancellations</b></p> <ul><li>You must contact me within <b>2 hours of purchase.</b></li></ul> <p></p> <p><b>Color Variations</b></p> <p>Colors may vary slightly due to device monitors, lighting, and yarn dye lots.&nbsp;</p> <p><b><br></b></p> <p><b>Shipping Issues</b></p> <ul><li>I ship all items via USPS & will have a tracking number.&nbsp;</li><li>I am unable to guarantee shipping times at any time. If an item hasn’t moved in two weeks, please let me know and I will file a lost/missing case with USPS.</li><li>If item says delivered but you have not received it, please try to following</li><ul><li>Go to your local USPS office and ask for GPS coordinates. They will be able to tell if the delivered coordinates match your address or not.&nbsp;</li><li>If GPS coordinates match your address, please check with other house members/neighbors if possible.&nbsp;</li><li>If still missing, please file a report with the local police station. Mail theft is a crime. Send me a copy of the report. Once I have verified it, I will send a replacement.&nbsp;</li></ul></ul> <p></p> <p>Please feel free to contact me if there are any other issues.&nbsp;</p> <p></p> rainbow-bag 3/14 <p>Hello, I'm Andrea! I first <span class="JsGRdQ" style="font-family: -apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, Roboto, &quot;Segoe UI&quot;, Ubuntu, &quot;Helvetica Neue&quot;, sans-serif;">learned how to crochet, thanks to my dad (yes! dad!), when I was just a kid. While other things have come and gone, the love of texture art has stayed with me. My main love, and what I specialize in, amigurumi, came about 10 year ago thanks to my desire to make cute stuffed items. You may also see regular/non-stuffed knit or crochet items, but amigurumi is my main focus.&nbsp;</span></p> <p><span style="font-family: -apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, Roboto, &quot;Segoe UI&quot;, Ubuntu, &quot;Helvetica Neue&quot;, sans-serif;">All pieces in my store are made to order, unless otherwise stated. However, if there is something you'd like that you're not seeing, please reach out to me or <a href="https://goimagine.com/art/fiber-arts/custom-order-request/">start a custom made order</a>. I&nbsp;love to do custom pieces and it's very rare that I can't find something/come up with something that will work!&nbsp;</span></p> <p>Want to know more about me/my products? Check me out on social media!</p> <p><span style="font-family: -apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, Roboto, &quot;Segoe UI&quot;, Ubuntu, &quot;Helvetica Neue&quot;, sans-serif;">All items are made in a pet-friendly (dog/cat) and smoke-free home.&nbsp;</span><span style="font-family: -apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, Roboto, &quot;Segoe UI&quot;, Ubuntu, &quot;Helvetica Neue&quot;, sans-serif;"></span><br></p> D