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

Query time 0.00187

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "2.33"
    },
    "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": "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": "0.70",
              "data_read_per_join": "32"
            },
            "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.50",
              "eval_cost": "0.01",
              "prefix_cost": "1.40",
              "data_read_per_join": "268"
            },
            "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": "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": 4,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.12",
              "eval_cost": "0.04",
              "prefix_cost": "1.56",
              "data_read_per_join": "9"
            },
            "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.03",
              "eval_cost": "0.04",
              "prefix_cost": "1.63",
              "data_read_per_join": "2K"
            },
            "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.05",
              "eval_cost": "0.04",
              "prefix_cost": "1.72",
              "data_read_per_join": "710"
            },
            "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.03",
              "eval_cost": "0.04",
              "prefix_cost": "1.79",
              "data_read_per_join": "5K"
            },
            "used_columns": [
              "company_id",
              "status"
            ],
            "attached_condition": "<if>(found_match(companies), ((`goimagine`.`companies`.`status` = 'A') or false), true)"
          }
        },
        {
          "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.34",
              "eval_cost": "0.04",
              "prefix_cost": "2.17",
              "data_read_per_join": "694"
            },
            "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.04",
              "prefix_cost": "2.25",
              "data_read_per_join": "710"
            },
            "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.04",
              "prefix_cost": "2.33",
              "data_read_per_join": "9"
            },
            "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
22428 P A 198 0.00 9 0.000 0 0 0 0.00 0 1589937783 1598034086 0 N N N B 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 Hand Made Brown Green Yellow and Orange Batik Cotton Face Mask With Elastic <p>Hand Made Brown Green Yellow and Orange Batik Cotton Face Mask With Elastic - These face masks are made of 2 layers of 100% cotton batik fabric with an inner layer of fusible interface.&nbsp; The mask is pleated front and back and expands to fit various sizes.&nbsp; The masks are reversible with a different color on the back so you will be able to tell the front from the back. </p> <p>Hand Made Brown Green Yellow and Orange Batik Cotton Face Mask With Elastic</p><p><br></p> <p></p> <p>These face masks are made of 2 layers of 100% cotton batik fabric with an inner layer of fusible interface.&nbsp; The mask is pleated front and back and expands to fit various sizes.&nbsp; The masks are reversible with a different color on the back so you will be able to tell the front from the back. </p> <p>&nbsp; </p> <p>This style face mask is made with 7" of white elastic. &nbsp;&nbsp;</p> <p>&nbsp; </p> <p>The masks are approximately 8" x 3.5" before expansion and 8" x 5 1/2"" after expansion.&nbsp; Sizes are approximate because being handmade there will be some variation. &nbsp; &nbsp;</p> <p>I will be making these in various prints and colors. &nbsp;&nbsp;</p> <p>&nbsp; </p> <p>All of the masks are handmade.&nbsp; I will do my best to keep up with the demand.&nbsp; If you have need of more than I have listed at the time, please drop me a message and tell me how many your would desire.&nbsp; I will do my best to accommodate your needs. </p> <p>&nbsp; </p> <p>If colors/prints are not a significant desire, I can make up masks to order as well.&nbsp; I will list more masks as they are finished.&nbsp; I have numerous masks in different stages of construction.&nbsp; </p> <p>&nbsp; </p> <p>NOTE:&nbsp; These face masks are not hospital/medical grade masks.&nbsp; These masks will help droplets from escaping into the air around you.&nbsp; They will help you to avoid touching your face.&nbsp; No health claims!!!&nbsp; There are no guarantees of any type of medical benefit with these masks.&nbsp; These masks do not accommodate filters!&nbsp; Please wash in hot water and dry in a hot dryer after every use!&nbsp; There is no refunds/returns on these items. </p> <p>&nbsp; </p> <p>I also am helping my local hospitals/medical facilities, persons who desire to have a mask through a local crafting group that I participate in.&nbsp; I have provided materials and have cut close to 200 masks and other women in the group are sewing, etc.&nbsp; We have one church that is local that have provided over 3000 masks already and have over 10,000 request for more. </p> <p>&nbsp; </p> <p>I think that it is important to give back with the talents that we are given and I enjoy helping others in time of need.&nbsp; For those who aren't capable of making their own masks I would be honored to be able to help you with a handmade work of art. </p> <p>&nbsp; </p> <p>Please allow up to 3+ days to complete your order (prior to shipping) if you are ordering masks that aren't ready to ship.&nbsp; Ready to ship masks will be mailed within 1-3 business days.&nbsp; Depending on the demand it make take longer if there are quantities of orders.&nbsp; I will communicate with you when to expect your order, especially if you would like to order numerous masks. </p> <p>&nbsp; </p> <p>Thank you for purchasing from me.&nbsp; Your support will enable me to not only support my business, it will also allow me to continue helping others as well. </p> <p>&nbsp; </p> <p>Please visit me on the following social media platforms </p> <p>&nbsp; </p> <p><a href="https://www.facebook.com/CoutureJewelrywithHeirloomLegacy">Facebook</a> </p> <p><a href="https://www.instagram.com/couturejewelryheirloomlegacy">Instagram</a> </p> <p><a href="https://www.pinterest.com/couturejewelryheirloomlegacy">Pinterest</a> </p> <p>&nbsp; &nbsp;&nbsp;</p> <p>Blessings and Grace to you all!! </p> mouth covering, reusable face mask, washable face masks, adult face masks, free shipping, fabric face masks, face covering, go imagine seller, caring economy, handmade for good, couture jewelry ​​Hand Made Brown Green Yellow and Orange Batik Cotton Face Mask With Elastic - These face masks are made of 2 layers of 100% cotton batik fabric with an inner layer of fusible interface. The mask is pleated front and back and expands to fit various size Handmade face masks, reusable face masks, washable face masks, adult face masks, free shipping, cotton face masks, mouth covering, 3 layer face masks, go imagine seller, caring economy, handmade for good, face covering, couture jewelry, fashion accessory, face masks with elastic, face masks, face mask ​​Hand Made Brown Green Yellow and Orange Batik Cotton Face Mask With Elastic <p>READY TO SHIP</p> <p>NOTE:&nbsp; These face masks are not hospital/medical grade masks.&nbsp; No health claims!!!&nbsp;</p> <p>Machine Wash and Air Dry Only - <strong>DO NOT PUT MASK IN THE MICROWAVE</strong></p> <p><strong></strong><br></p> <p>&nbsp;Due to the pattern of this fabric no two masks will be the same. Your mask will NOT look like the sample picture.&nbsp;</p> <p></p> <p>These handmade masks are made of 2 layers of 100% cotton with 1 layer of interfacing.&nbsp; They are finished with flat elastic and 2 layers of topstitching.</p> 10.00000000 128M,178 7389 Couture Jewelry with Heirloom Legacy <p>PROCESSING TIME</p> <p>Jewelry that is ready to ship will be available for shipping within 7 days. Orders may be shipped earlier, but are not guaranteed to be shipped prior to 7 days.</p> <p><br></p> <p>SELLING TO USA ONLY</p> <p>Couture Jewelry doesn't offer shipping outside of the United States</p> <p><br></p> <p>CANCELLATIONS</p> <p>Couture Jewelry does not offer cancellations.&nbsp; If there are any problems, please contact Couture Jewelry at info@couture-jewelry.com</p> <p><br></p> <p>GENERAL TERMS</p> <p>Satisfaction is 100% guaranteed. If there should be any problems with an order, please contact me first before returning.&nbsp;</p> <p>If after talking with you about your order you still wish to return the item please send back to Couture Jewelry in the original, unaltered condition and the original packaging within 14 days of purchase for a refund of the purchase price. If we have decided ahead of time you would like to exchange your purchased item for an equal value item, we can do this as well.&nbsp;</p> <p>PLEASE DO NOT RETURN ANY ITEMS WITHOUT CONTACTING COUTURE JEWELRY FIRST. <strong>BUYER</strong> is responsible for shipping costs to send products back to Couture Jewelry.&nbsp; If the product is received not in original condition the <strong>BUYER</strong> is responsible for any loss in value.</p> <p><strong>Returns or exchanges are not accepted on the following:&nbsp;</strong></p> <p><strong></strong><br></p> <ul><li><strong>&nbsp;Merchandise returned after 14 days from the original ship date&nbsp;</strong></li><li><strong>&nbsp;Personal items such as face masks</strong></li><li><strong>&nbsp;Custom Made Orders&nbsp;</strong></li><li><strong>&nbsp;Items that have been purchased on sale.&nbsp;</strong></li></ul> <p>Refunds will be issued via Stripe once the merchandise has been received by Couture Jewelry. If you have any questions about your order, please do not hesitate to contact me by email at info@couture-jewelry.com</p> <p><br></p> <p><strong>NO RETURNS ON PERSONAL ITEMS SUCH AS FACE MASKS!</strong></p> <p><b class="_2K_N3" aria-expanded="false" data-hook="collapse-info-button"><strong></strong><br></b></p> <p><b class="_2K_N3" aria-expanded="false" data-hook="collapse-info-button"><br></b></p> <p><b class="_2K_N3" aria-expanded="false" data-hook="collapse-info-button"><br></b><br></p> <p><b class="_2K_N3" aria-expanded="false" data-hook="collapse-info-button"></b></p> <p><b class="_2K_N3" aria-expanded="false" style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; box-sizing: border-box; color: rgb(0, 0, 0); cursor: pointer; display: flex; font-family: wfont_890dd1_d811b5e3bc4b4d1fbcc513de8e39b099,wf_d811b5e3bc4b4d1fbcc513de8,orig_poppins_bold; font-size: 21px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: 26px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: invert; outline-style: none; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-align: inherit; text-decoration: inherit; vertical-align: baseline; width: 100%;" data-hook="collapse-info-button"><br></b></p> hand-made-brown-green-yellow-and-orange-batik-cotton-face-mask-with-elastic 12/319/128 <p>Teresa Delosh of Couture Jewelry specializes in handmade artisan jewelry that is designed to become family heirlooms for generations to come.&nbsp; I love to make jewelry that you will be proud to pass on to your family.&nbsp; I feature beadweaving, free standing lace, vinyl and leather jewelry.&nbsp; Now offering fashion accessories along with our jewelry.</p> D