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

Query time 0.00668

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "5.30"
    },
    "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.33",
              "eval_cost": "0.10",
              "prefix_cost": "0.43",
              "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.17",
              "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.16",
              "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.95",
              "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": 3,
            "rows_produced_per_join": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.75",
              "eval_cost": "0.30",
              "prefix_cost": "4.00",
              "data_read_per_join": "48"
            },
            "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": "0.75",
              "eval_cost": "0.02",
              "prefix_cost": "5.05",
              "data_read_per_join": "402"
            },
            "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.13",
              "eval_cost": "0.02",
              "prefix_cost": "5.19",
              "data_read_per_join": "260"
            },
            "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.02",
              "prefix_cost": "5.25",
              "data_read_per_join": "266"
            },
            "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.02",
              "prefix_cost": "5.30",
              "data_read_per_join": "3"
            },
            "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
156684 GI-156684-ZLT P A 3195 24.95 10 0.000 0 0 0 0.00 0 1638788270 1674067930 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: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.000 2147483647 en Braided Paracord Hands Free Leash <p>This strong and durable braided dog leash is part of the hands free leash system for Walking, Running, and Hiking with your medium to large dog. Wear it clipped to a waist belt or use one of the two loop handle ends to have control where you need it.<br></p> <p>Available in 4', 6' and 8' lengths, custom lengths can also be made!</p> <p>This paracord leash provides 3 options in 1 leash:&nbsp;<br>1. Clip to one of the waist belts for a hands free option.&nbsp;<br>2. Use as a regular leash with the provided handle loop or add-on leash handle (sold separately).<br>3. Add a leash handle to convert this to a double-clip no-pull hands free leash.&nbsp;<em></em></p> <p><em></em>MORE COLORS AVAILABLE!</p> <p>STANDARD HARDWARE<br>Leash comes with standard swivel snap bolts on both ends, suitable for dogs up to 80lbs. Check out other hardware options available, listed below.</p> <p>HARDWARE UPGRADE OPTIONS<br>Swivel snap bolts can occasionally accidentally open if they get caught on brush or if your dog loves to roll on the ground, so if your dog's recall isn't solid, your pup is reactive or a flight risk, consider upgrading to a carabiner or locking carabiner on the "dog end" of the leash for added security. Keep the "human end" as a swivel snap bolt to keep the leash from twisting and to allow a quick detach of the leash in an emergency.</p> <p><b>Hardware Upgrades are available in the following types, Listed "dog end - human end - weight recommendations":</b></p> <ol><li>Standard swivel snap bolt - standard swivel snap bolt - up to 80 lbs</li><li>Heavy duty swivel snap bolt - heavy duty swivel snap bolt - over 80 lbs</li><li>Non-locking carabiner - standard swivel snap bolt - up to 80 lbs</li><li>Locking carabiner - standard swivel snap bolt - up to 80 lbs</li><li>Locking carabiner - heavy duty swivel snap bolt - up to 120 lbs</li><li>Heavy duty locking carabiner - heavy duty swivel snap bolt - over 100 lbs</li></ol> <p>CARE & CLEANING<br>Paracord leashes can be hand washed, cool water, gentle detergent. No Bleach. Hang to dry.</p> <p>RETURNS & EXCHANGES<br>Please double check your desired leash length, especially if using a waist belt is new to you because the distance your dog can travel on a belted leash is different than a hand-held leash. My favorite length for neighborhood walks is an 8' leash, but please check with the regulations in your area for any specified leash length restrictions.<br>Buyer is responsible for all postage on any return or exchange, return/exchange must be in unused/ new condition.</p> <p><strong></strong><br></p> 4 foot leash, 6 foot leash, 8 foot leash, double clip dog leash, double ended dog lead, strong hands free leash for large dog, convertible leash, no pull dog leash, hands-free dog leash for medium to large dogs Strong, versatile, & available in 3 standard lengths, this leash is suitable for a variety of adventures as part of my hands-free leash system. Walk, run or hike with confidence, hands-free! I use the 8' in my daily walks, converting to no-pull as needed. <p>Ships in 1-3 Business Days</p> <p>Paracord is an extremely strong and durable material, weather-resistant and washable. The Diamond Braid allows for a fun “spiral” pattern in coordinating colors, while also providing an extremely strong leash that is comfortable in your hands.</p> <p>A standard swivel snap bolt is provided for both ends of this hand braided leash and is suitable for most dogs. This is the clip I use myself with my 80 lb "product tester".<br></p> <p>I offer other styles of snap bolts and carabiners as well.</p> <p><br></p> 24.95000000 52M,229,10125 1943 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> paracord-leash-template 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