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 = 170354 
  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 = 170354 
  AND (
    companies.status IN ('A') 
    OR products.company_id = 0
  ) 
GROUP BY 
  products.product_id

Query time 0.00452

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "6.03"
    },
    "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.30",
              "eval_cost": "0.10",
              "prefix_cost": "0.40",
              "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.64",
              "eval_cost": "0.10",
              "prefix_cost": "1.13",
              "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.90",
              "eval_cost": "0.10",
              "prefix_cost": "2.14",
              "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": "2.92",
              "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": 4,
            "rows_produced_per_join": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.40",
              "prefix_cost": "4.32",
              "data_read_per_join": "64"
            },
            "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.00",
              "eval_cost": "0.02",
              "prefix_cost": "5.72",
              "data_read_per_join": "536"
            },
            "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.17",
              "eval_cost": "0.02",
              "prefix_cost": "5.91",
              "data_read_per_join": "347"
            },
            "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.05",
              "eval_cost": "0.02",
              "prefix_cost": "5.97",
              "data_read_per_join": "355"
            },
            "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.03",
              "eval_cost": "0.02",
              "prefix_cost": "6.03",
              "data_read_per_join": "4"
            },
            "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
170354 GI-170354-SCX P A 3195 19.95 6 0.125 0 0 0 0.00 0 1642990179 1674067851 0 N N N D Y 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:1;s:16:"max_items_in_box";i:2;s:10:"box_length";i:10;s:9:"box_width";i:10;s:10:"box_height";i:1;} 0.000 2.000 2147483647 en Reflective Belt Bag <p>This Reflective Belt Pouch fits on any of my hands free leash belts and provides extra carry room with an added safety bonus! These High Visibility colors are bright on their own, but offer a white reflection in any car headlights for your night-time dog walks.</p> <p>Grab one in Red to hold your first aid supplies too!</p> <p>HOW IT WORKS<br>These soft, light weight pouches (1 and 2 ounces) can be used multiple ways:<br>Fit on a belt for easiest access during your walk, run or hike.<br>Clipped to a bag or belt-loop by way of a carabiner (not included)</p> <p>BELTS SOLD SEPERATELY<br>Light Weight, Medium Weight and Heavy Duty Belts are also available in my shop.<br></p> <p>SIZES<br>The small bag can easily carry a cell phone, keys and small wallet, or use it like I do and carry your dog's poo bags!</p> <p>The large bag can be used for extra supplies on a day hike for you and your pooch, or line it with an extra grocery bag and use it to pack out your garbage & bagged dog poo so you can "leave no trace".</p> <p></p> <p>Ships in 1-3 Business Days</p> <p>These bags are sewn from a 100% Polyester fabric that is reflective in car headlights - a great safety feature when walking or running with your dog after dark.&nbsp;</p> <p>This fabric is water resistant, but the pouch is not waterproof because of the zipper.</p> <p>CARE & CLEANING<br>This 100% polyester fabric pouch can be hand or machine washed in cool water, no bleach. Hang or lay flat to dry.</p> 19.95000000 52M,229,10141 1959 Green Mountain Mutts1 <p><span style="color: rgb(34, 34, 34); font-weight: 700;">Processing Times</span></p> <p>Processing Time will vary based on the product. Please see the information in the description of each product or reach out to me if you want to clarify my processing time on anything custom.</p> <p><span style="color: rgb(34, 34, 34); font-weight: 700;">I accept returns, exchanges, and cancellations</span></p> <p>Contact me within: 10 days of delivery<br>Ship items back within: 14 days of delivery<br>Request a cancellation within: 2 hours of purchase for standard items.</p> <p><strong>The following items cannot be returned or exchanged</strong></p> <p>Because of the nature of these items, unless they arrive damaged or defective, I can't accept returns for:</p> <ul><li>Custom orders</li><li>Items on sale</li></ul> <p><strong>Conditions of return</strong></p> <p>Buyers are responsible for return shipping costs. If the item is not returned in its original condition, the buyer is responsible for any loss in value.</p> <p><strong>Damaged Package?</strong></p> <p>Please document any package damage prior to opening your delivery, multiple photos including at least one showing the shipping label clearly will help me make a claim to USPS for damages. Please also take multiple photos of your product and clear images of any damage that it has sustained.&nbsp;</p> <p><b>Shipping Time Estimates</b></p> <p>Estimated shipping time frame does not typically include any extension for USPS delays that are in effect due to staffing shortages or weather related delays. If you need a product by a specific date please reach out prior to ordering and see what my current shipping and delivery times are to your region.</p> <p><span style="color: rgb(192, 80, 77);"></span><i style="font-weight: 700;"><span style="color: rgb(192, 80, 77);">Where's My Package?</span></i></p> <p>If your tracking says "Delivered" but it's not in your mailbox?</p> <p>USPS frequently scans packages and marks them "delivered" up to 24 hours prior to physical delivery. Please be patient and remember that this is not within my control!</p> <p>Please read the USPS help for information on delivery and finding your packages:&nbsp;<a href="https://faq.usps.com/s/article/Where-is-my-package">https://faq.usps.com/s/article...</a></p> <p>Consider signing up for USPS "informed delivery" to get up to date notices!</p> <p><b>Care Instructions</b></p> <p>Webbing Leashes: Hand wash in cool water with gentle dishwashing liquid, or Machine wash in leash wash bag or knotted pillow case, delicate cycle, cold. Hang to dry. </p> <p>Paracord Leashes: Hand wash in cool water with gentle dishwashing liquid, or Machine wash in leash wash bag or knotted pillow case, delicate cycle, cold. Hang to dry.</p> <p><strong>Custom Items</strong></p> <p>I can do customization on the majority of my existing leash products, please reach out with questions prior to ordering.<br><br>There will be an additional charge for a webbing or paracord color that I do not currently offer. I cannot guarantee color matching with your existing equipment but will do my best to find the closest option that I have available or that I&nbsp;can find with my suppliers.<br><br>If you do not see a product in my shop and are interested in something completely custom, please send me a message with as much detail as possible and I will let you know what I can do for you.<br><br>I do not offer personalization (i.e. pet names) on products at this time.</p> <p><strong>Sizing Details</strong></p> <p>Braided Paracord Leashes and Long Lines do have some initial stretch. I make them as close to the stated lengths as possible, but you can expect them to get slightly longer as they are used. If you need an exact finished measurement please reach out to discuss options prior to ordering</p> <p>Webbing Leashes are measured "clip-end to clip-end" or "clip-end to leash-end" unless stated otherwise. I do my best to get as close to the stated length as possible but will err on the side of longer rather than shorter.</p> <p>Leash Couplers are measured "clip to center of O-Ring"</p> <p><strong>Quantity/Bulk/Wholesale Orders</strong></p> <p>Please reach out if interested in purchasing 10 or more of any one item.&nbsp;</p> <p><br></p> <p><br></p> <h6></h6> <p><br></p> reflective-belt-bag 4/52 <p>My 80 lb "critter chaser" is the highlight of my shop! Rowan supervises me while I work and together we test all the products to make sure that you have equipment that you can rely on so that you can enjoy your adventures worry-free and hands-free!</p> D