SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  products.amount, 
  descr1.product as product, 
  companies.company as company_name, 
  variation_group_products.group_id AS variation_group_id, 
  products.product_type, 
  products.parent_product_id, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id 
  AND descr1.lang_code = 'en' 
  LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id 
  INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id 
  INNER JOIN cscart_product_variation_group_products AS variation_group_products ON variation_group_products.product_id = products.product_id 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
WHERE 
  1 
  AND companies.status IN ('A') 
  AND (
    products.amount > 0 
    OR products.tracking = 'D'
  ) 
  AND (
    products.usergroup_ids = '' 
    OR FIND_IN_SET(0, products.usergroup_ids) 
    OR FIND_IN_SET(1, products.usergroup_ids)
  ) 
  AND products.status IN ('A') 
  AND variation_group_products.group_id IN (
    12314, 12976, 16774, 12503, 14770, 13981, 
    15873, 12425, 15476, 17104, 12498, 
    12591, 12908, 15471
  ) 
GROUP BY 
  products.product_id 
ORDER BY 
  NULL asc

Query time 0.06500

JSON explain

{
  "query_block": {
    "select_id": 1,
    "temporary_table": {
      "nested_loop": [
        {
          "table": {
            "table_name": "variation_group_products",
            "access_type": "range",
            "possible_keys": ["PRIMARY", "idx_group_id"],
            "key": "idx_group_id",
            "key_length": "3",
            "used_key_parts": ["group_id"],
            "rows": 51,
            "filtered": 100,
            "index_condition": "variation_group_products.group_id in (12314,12976,16774,12503,14770,13981,15873,12425,15476,17104,12498,12591,12908,15471)"
          }
        },
        {
          "table": {
            "table_name": "products",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY", "status"],
            "key": "PRIMARY",
            "key_length": "3",
            "used_key_parts": ["product_id"],
            "ref": ["dev_db.variation_group_products.product_id"],
            "rows": 1,
            "filtered": 51.89157104,
            "attached_condition": "(products.amount > 0 or products.tracking = 'D') and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A'"
          }
        },
        {
          "table": {
            "table_name": "companies",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY"],
            "key": "PRIMARY",
            "key_length": "4",
            "used_key_parts": ["company_id"],
            "ref": ["dev_db.products.company_id"],
            "rows": 1,
            "filtered": 100,
            "attached_condition": "companies.`status` = 'A'"
          }
        },
        {
          "table": {
            "table_name": "descr1",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY", "product_id"],
            "key": "PRIMARY",
            "key_length": "11",
            "used_key_parts": ["product_id", "lang_code"],
            "ref": ["dev_db.variation_group_products.product_id", "const"],
            "rows": 1,
            "filtered": 100,
            "attached_condition": "trigcond(descr1.lang_code = 'en')"
          }
        },
        {
          "table": {
            "table_name": "cscart_product_review_prepared_data",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY"],
            "key": "PRIMARY",
            "key_length": "7",
            "used_key_parts": ["product_id", "storefront_id"],
            "ref": ["dev_db.variation_group_products.product_id", "const"],
            "rows": 1,
            "filtered": 100
          }
        },
        {
          "table": {
            "table_name": "products_categories",
            "access_type": "ref",
            "possible_keys": ["PRIMARY", "pt"],
            "key": "pt",
            "key_length": "3",
            "used_key_parts": ["product_id"],
            "ref": ["dev_db.variation_group_products.product_id"],
            "rows": 1,
            "filtered": 100
          }
        },
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "eq_ref",
            "possible_keys": ["PRIMARY", "p_category_id"],
            "key": "PRIMARY",
            "key_length": "3",
            "used_key_parts": ["category_id"],
            "ref": ["dev_db.products_categories.category_id"],
            "rows": 1,
            "filtered": 100,
            "using_index": true
          }
        }
      ]
    }
  }
}

Result

product_id amount product company_name variation_group_id product_type parent_product_id average_rating product_reviews_count
15600 999 Sencha Brown Rice Tea, Healthy Tea, Natural Ingredients, Green Tea, Sencha, Brown Rice, No Preservatives, Gift For Health Hygie and Panacee 12314 V 6063 5.00 9
6063 999 Sencha Brown Rice Tea, Healthy Tea, Natural Ingredients, Green Tea, Sencha, Brown Rice, No Preservatives, Gift For Health Hygie and Panacee 12314 P 0 5.00 9
16371 999 Ginger Kefir Soda, Fermented Drink, Probiotic Drink, Good For Digestion, Natural Ingredients, Fresh Local Ingredients Tracy Kefir 12425 V 5834 5.00 4
5834 999 Ginger Kefir Soda, Fermented Drink, Probiotic Drink, Good For Digestion, Natural Ingredients, Fresh Local Ingredients Tracy Kefir 12425 P 0 5.00 4
16597 999 Vi Ta' Arabica And Robusta Coffee Blend, Vietnamese Coffee Blend, Traditional Vietnamese Coffee, Hand-Roasted Coffee Beans, Gift Coffee Thiên Ân Coffee 12498 V 5567 4.92 26
16596 999 Vi Ta' Arabica And Robusta Coffee Blend, Vietnamese Coffee Blend, Traditional Vietnamese Coffee, Hand-Roasted Coffee Beans, Gift Coffee Thiên Ân Coffee 12498 V 5567 4.92 26
5567 999 Vi Ta' Arabica And Robusta Coffee Blend, Vietnamese Coffee Blend, Traditional Vietnamese Coffee, Hand-Roasted Coffee Beans, Gift Coffee Thiên Ân Coffee 12498 P 0 4.92 26
16606 999 Giong 4 Coffee Blend, The Warming Coffee, Coffee Blend, Clean Ingredients, High-quality Coffee, Strong Flavors, Artisanal Coffee Gióng 12503 V 5553 4.50 12
16605 999 Giong 4 Coffee Blend, The Warming Coffee, Coffee Blend, Clean Ingredients, High-quality Coffee, Strong Flavors, Artisanal Coffee Gióng 12503 V 5553 4.50 12
5553 999 Giong 4 Coffee Blend, The Warming Coffee, Coffee Blend, Clean Ingredients, High-quality Coffee, Strong Flavors, Artisanal Coffee Gióng 12503 P 0 4.50 12
17734 999 Leaf Scented Candle OnaTree - Vietnamese Cosmetics 12591 V 5141 4.67 6
17733 999 Leaf Scented Candle OnaTree - Vietnamese Cosmetics 12591 V 5141 4.67 6
5141 997 Leaf Scented Candle OnaTree - Vietnamese Cosmetics 12591 P 0 4.67 6
18761 999 Blue Ceramic Wooden Bell Buffalo Figurine, Ceramic Figurine, Vietnamese Ceramics, Decor Item, Unique Design, Handicraft, Toxin-Free HCERAMIC 12908 V 3880 5.00 13
3880 998 Blue Ceramic Wooden Bell Buffalo Figurine, Ceramic Figurine, Vietnamese Ceramics, Decor Item, Unique Design, Handicraft, Toxin-Free HCERAMIC 12908 P 0 5.00 13
19040 999 Gift Box of Scented Candles With Resin Orange-Slice Candle Tray Onio Soapery 12976 V 3663 5.00 14
19036 999 Gift Box of Scented Candles With Resin Orange-Slice Candle Tray Onio Soapery 12976 V 3663 5.00 14
19035 998 Gift Box of Scented Candles With Resin Orange-Slice Candle Tray Onio Soapery 12976 V 3663 5.00 14
19034 999 Gift Box of Scented Candles With Resin Orange-Slice Candle Tray Onio Soapery 12976 V 3663 5.00 14
19033 999 Gift Box of Scented Candles With Resin Orange-Slice Candle Tray Onio Soapery 12976 V 3663 5.00 14
3663 999 Gift Box of Scented Candles With Resin Orange-Slice Candle Tray Onio Soapery 12976 P 0 5.00 14
1429 1996 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 P 0 5.00 2
23233 1997 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
23234 1996 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
23235 1996 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
23236 1996 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
23237 1996 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
23238 1997 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
23239 1996 Squared Silk Scarf, Handwoven Scarf, Neck Scarf, Hair Tie Scarf, Beach Headscarf, Accessory Scarf, Silk Scarf For The Beach ÓNG heartmadeinvietnam 13981 V 1429 5.00 2
112 1993 Natural Macadamia Nuts Size 2 (22-26mm), Natural Macadamia Nuts, Healthy Snacks, Nutritious Nuts, Cracked Shell Macadamia Nuts Damaca 14770 P 0 4.86 7
50110 1993 Natural Macadamia Nuts Size 2 (22-26mm), Natural Macadamia Nuts, Healthy Snacks, Nutritious Nuts, Cracked Shell Macadamia Nuts Damaca 14770 V 112 4.86 7
32616 995 Polyscias Fruticosa Instant Tea, Herbal Instant Tea, Vietnamese Herbs, Natural, Good For Sleep, Improve Resistance, Gift For Health Hygie and Panacee 15471 V 6057 4.92 13
6057 996 Polyscias Fruticosa Instant Tea, Herbal Instant Tea, Vietnamese Herbs, Natural, Good For Sleep, Improve Resistance, Gift For Health Hygie and Panacee 15471 P 0 4.92 13
32617 997 Polyscias Fruticosa Instant Tea, Herbal Instant Tea, Vietnamese Herbs, Natural, Good For Sleep, Improve Resistance, Gift For Health Hygie and Panacee 15471 V 6057 4.92 13
32626 999 Ginger Honey Instant Tea, Vietnamese Tea, Herbal Instant Tea, Natural Tea, Healthy Instant Tea, Convenient, Ginger Honey Powder Hygie and Panacee 15476 V 6062 5.00 12
6062 998 Ginger Honey Instant Tea, Vietnamese Tea, Herbal Instant Tea, Natural Tea, Healthy Instant Tea, Convenient, Ginger Honey Powder Hygie and Panacee 15476 P 0 5.00 12
32627 999 Ginger Honey Instant Tea, Vietnamese Tea, Herbal Instant Tea, Natural Tea, Healthy Instant Tea, Convenient, Ginger Honey Powder Hygie and Panacee 15476 V 6062 5.00 12
36746 11 Bamboo Thermo Flask, Bamboo Flask, Eco-friendly Flask, Bamboo Utensils, Unique Gifts, Personalized Gifts Tre Việt 15873 P 0 5.00 16
44939 999 “Calm” Ring, Rectangular Charm With Red Dot, Leather And Ceramic Material, Vintage Style, Unique And Distinctive Accessory Nombre 16774 P 0 5.00 1
44964 999 “Calm” Ring, Rectangular Charm With Red Dot, Leather And Ceramic Material, Vintage Style, Unique And Distinctive Accessory Nombre 16774 V 44939 5.00 1
44965 999 “Calm” Ring, Rectangular Charm With Red Dot, Leather And Ceramic Material, Vintage Style, Unique And Distinctive Accessory Nombre 16774 V 44939 5.00 1
6211 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 P 0 5.00 1
47909 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 V 6211 5.00 1
47910 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 V 6211 5.00 1
47911 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 V 6211 5.00 1
47912 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 V 6211 5.00 1
47913 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 V 6211 5.00 1
47914 999 Genuine Leather Mary Jane Shoes, Vintage Leather Shoes, Lolita Shoes, Round-Toe Mary Jane Shoes, Strap Mary Jane Shoes SHAMONG 17104 V 6211 5.00 1