SELECT 
  cscart_products.*, 
  cscart_product_descriptions.*, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      cscart_products_categories.link_type = 'M'
    ) THEN CONCAT(
      cscart_products_categories.category_id, 
      'M'
    ) ELSE cscart_products_categories.category_id END 
    ORDER BY 
      cscart_categories.storefront_id IN (0, 1) DESC, 
      (
        cscart_products_categories.link_type = 'M'
      ) DESC, 
      cscart_products_categories.category_position ASC, 
      cscart_products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  companies.company as company_name, 
  cscart_product_sales.amount as sales_amount, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path, 
  cscart_discussion.type as discussion_type, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count, 
  companies.discreet_shipping as company_discreet_shipping 
FROM 
  cscart_products 
  LEFT JOIN cscart_product_prices ON cscart_product_prices.product_id = cscart_products.product_id 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_product_descriptions ON cscart_product_descriptions.product_id = cscart_products.product_id 
  AND cscart_product_descriptions.lang_code = 'en' 
  LEFT JOIN cscart_companies as companies ON companies.company_id = cscart_products.company_id 
  INNER JOIN cscart_products_categories ON cscart_products_categories.product_id = cscart_products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = cscart_products_categories.category_id 
  AND cscart_categories.storefront_id IN (0, 1) 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND (
    cscart_products.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_products.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_products.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  AND cscart_products.status IN ('A', 'H') 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = cscart_products.product_id 
  LEFT JOIN cscart_product_sales ON cscart_product_sales.product_id = cscart_products.product_id 
  AND cscart_product_sales.category_id = 16 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 9498 
  AND cscart_seo_names.type = 'p' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = cscart_products.product_id 
  AND cscart_discussion.object_type = 'P' 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = cscart_products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
WHERE 
  cscart_products.product_id = 9498 
  AND (
    companies.status IN ('A') 
    OR cscart_products.company_id = 0
  ) 
GROUP BY 
  cscart_products.product_id

Query time 0.00164

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "3.05"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_products",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "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": "5K"
            },
            "used_columns": [
              "product_id",
              "lead_time",
              "etsy_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",
              "facebook_obj_type",
              "parent_product_id",
              "allow_notes",
              "buy_now_url",
              "master_product_id",
              "master_product_status",
              "master_product_offers_count",
              "variation_sku",
              "has_color",
              "color_feature_id",
              "featured",
              "shopify_parent_product_id",
              "shopify_variant_product_id"
            ]
          }
        },
        {
          "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": "cscart_product_sales",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "pa"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "product_id"
            ],
            "key_length": "6",
            "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": "16"
            },
            "used_columns": [
              "category_id",
              "product_id",
              "amount"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_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.25",
              "eval_cost": "0.10",
              "prefix_cost": "0.35",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(cscart_product_prices), ((`cscartdb`.`cscart_product_prices`.`lower_limit` = 1) and (`cscartdb`.`cscart_product_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "cscart_product_descriptions",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "product_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.77",
              "eval_cost": "0.10",
              "prefix_cost": "1.22",
              "data_read_per_join": "3K"
            },
            "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",
              "stop_words"
            ]
          }
        },
        {
          "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.25",
              "eval_cost": "0.10",
              "prefix_cost": "1.57",
              "data_read_per_join": "15K"
            },
            "used_columns": [
              "company_id",
              "status",
              "company",
              "discreet_shipping"
            ],
            "attached_condition": "<if>(found_match(companies), ((`cscartdb`.`companies`.`status` = 'A') or false), true)"
          }
        },
        {
          "table": {
            "table_name": "cscart_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": 2,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.50",
              "eval_cost": "0.20",
              "prefix_cost": "2.27",
              "data_read_per_join": "32"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "cscartdb.cscart_products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "0.50",
              "eval_cost": "0.01",
              "prefix_cost": "2.97",
              "data_read_per_join": "344"
            },
            "used_columns": [
              "category_id",
              "storefront_id",
              "usergroup_ids",
              "status"
            ],
            "attached_condition": "((`cscartdb`.`cscart_categories`.`storefront_id` in (0,1)) and ((`cscartdb`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscartdb`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscartdb`.`cscart_categories`.`usergroup_ids`))) and (`cscartdb`.`cscart_categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_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.03",
              "eval_cost": "0.01",
              "prefix_cost": "3.01",
              "data_read_per_join": "173"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_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.01",
              "eval_cost": "0.01",
              "prefix_cost": "3.03",
              "data_read_per_join": "2"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_product_review_prepared_data",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "storefront_id"
            ],
            "key_length": "7",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.01",
              "eval_cost": "0.01",
              "prefix_cost": "3.05",
              "data_read_per_join": "1"
            },
            "used_columns": [
              "product_id",
              "storefront_id",
              "average_rating",
              "reviews_count"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id lead_time etsy_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 facebook_obj_type parent_product_id allow_notes buy_now_url master_product_id master_product_status master_product_offers_count variation_sku has_color color_feature_id featured shopify_parent_product_id shopify_variant_product_id lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text stop_words price category_ids popularity company_name sales_amount seo_name seo_path discussion_type average_rating product_reviews_count company_discreet_shipping
9498 3 P A 67 0.00 11 0.750 0 0 0 0.00 0 1710972510 1722873369 0 N N N N P N N N Y 10 0 N N 0 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;} activity 0 Y 0 A 0 0 0 0 en Silicone Ball Gag with PVC Rubber Strap Silicone Ball Gag with Black PVC Rubber Strap. The balls are handmade by me (Longwatcher) in Newport News, Virginia, USA from a Medical grade level of silicone material. They are purpose made for human use with a 3/4" strap hole. The balls are available in the following colors: Red, Black, White, Blue, Purple, Pink, Pearl, Silver, Clear, Translucent Blue, Yellow, Green, Gold, Chocolate Brown, Pearl*, Silver*, and Clear**. Availability is as shown in the 4th image of all the balls. The Balls are not certified because the FDA does not certify adult products, however the material is of a type that could be if they did. The strap is a quality black PVC rubber strap that I cut to length, edge for comfort. (Note: I do not know if these straps have latex in them, although I have a mild latex issue and have had no problems with these straps). The straps are 1/2", 3/4", or 1" wide (depending on ball Diameter and can be made to any desired length, although the default regular size fits about 16" to 20.5" around the head. Please let me know in a note with the order if you want other than the default size. Size is measure all the way around the head where the strap would go with an open mouth as if with a ball gag in it. It is not the length. It is from the end of the buckle to the desired tongue hole. Length is measured from the tip (or billet end) of the strap to where the tongue crosses the end bar of the buckle. The length will be about 3.5" longer than size for a custom strap with 3 holes for the tongue. I can put any of 6 buckles on the strap (shown in one of the above pictures), - Black Locking (Default) - Nickel Locking - Brass Locking - Nickel NON-Locking - Black NON-locking - Brass NON-Locking (Please send me a note with the order for other than the default) The following sizes come with a 1/2" wide small size (14-18" size range) strap (Sizes added to this listing Dec 2022) 1.0" (25.4mm) Tiny (T) 1.125" (28.6mm) Ultra-Small (U) 1.25" (31.75mm) Extra-Small (V) 1.375" (34.925) Petite (P) (this one comes with a Regular size strap) I currently have the following Ball sizes available that will fit the 3/4" strap with a regular default strap (16-20.5" range) 1.5" (38.1mm) Small (S) 1.75" (44.45mm) Medium Small (R) 1.875" (47.625mm) Medium (N) 2.0" (50.8mm) Medium Large (M) 2.125" (54mm) Large (L) 2.25" (57.15mm) Extra Large (X) 2.375" (60.325mm) 2X Large (Y) (this one comes with a long Strap) 2.5" (63.5mm) Super Large (Z) (this one comes with a long Strap) The following sizes come with a 1" wide strap in a long default size (18-22.5" range) (these sizes added to this listing Dec 2022) 2.625" (66.575mm) Huge (H) 2.75" (69.85mm) Gigantic (G) 2.875" (73.025mm) Enormous (E) 3.0" (76.3mm) Goddess (F) Shipping within the USA will usually be by USPS first class mail. International Shipping will be lowest cost method, usually USPS First Class Package. Ball gags are sold "AS IS" since I can not resell them, however I will replace any mistakes I make with the orders. If the inner bag remains sealed I can usually take them back in exchange. Strap length measurements are plus or minus 1/4". The balls should be within the tolerances of molding (1/16th of an inch). Note*: Pearl and Silver Colors are food grade level only due to colorant only being certified to that level. Note**: Clear may have up to two defects as long as they are both on the same side and minor. Most likely to occur on larger balls. Ball Gag, gags, vegan, PVC, Pleasure Paradox, silicone Silicone Ball Gag with Black PVC Rubber Strap. Ball Gag, gags, vegan, PVC, Pleasure Paradox, silicone Silicone Ball Gag with PVC Rubber Strap 30.00000000 16M,254 3471 Pleasure Paradox 1 silicone-ball-gag-with-pvc-rubber-strap 4/16 D N