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 (
    16064, 15624, 15771, 16310, 13677, 14380, 
    13453, 16315, 17248, 15930, 16479, 
    15887, 15929, 12779, 12887
  ) 
GROUP BY 
  products.product_id 
ORDER BY 
  NULL asc

Query time 0.03372

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": 67,
            "filtered": 100,
            "index_condition": "variation_group_products.group_id in (16064,15624,15771,16310,13677,14380,13453,16315,17248,15930,16479,15887,15929,12779,12887)"
          }
        },
        {
          "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
18383 999 Medium Arch Earrings In Silver Color, Made Of Fired Clay, Gold-Plated Stainless Steel Hooks, High Durability, Gift For The Girls CLAY BY POLLY 12779 V 4287 0
4287 999 Medium Arch Earrings In Silver Color, Made Of Fired Clay, Gold-Plated Stainless Steel Hooks, High Durability, Gift For The Girls CLAY BY POLLY 12779 P 0 0
18723 999 Crossbody Hexagonal Quilting Bag Tomato Handmade 12887 V 3979 0
3979 999 Crossbody Hexagonal Quilting Bag Tomato Handmade 12887 P 0 0
21088 6 Lemongrass Glass Jar Scented Candle, Vintage Style, Natural Wax Candle, Relaxing and Elegant, Bringing Nature into Your Home Iris Nguyen - Perfumery House 13453 V 2454 0
2454 5 Lemongrass Glass Jar Scented Candle, Vintage Style, Natural Wax Candle, Relaxing and Elegant, Bringing Nature into Your Home Iris Nguyen - Perfumery House 13453 P 0 0
22104 999 Liquorice Musk Perfume, Licorice Scent, Beloved By Women, Impressive Fragrance, Long-Lasting, Adorable Gift Saigon Elixir 13677 V 1998 0
22103 999 Liquorice Musk Perfume, Licorice Scent, Beloved By Women, Impressive Fragrance, Long-Lasting, Adorable Gift Saigon Elixir 13677 V 1998 0
1998 999 Liquorice Musk Perfume, Licorice Scent, Beloved By Women, Impressive Fragrance, Long-Lasting, Adorable Gift Saigon Elixir 13677 P 0 0
764 1998 Red & Blue Clay Necklace & Earrings, Small Round Shapes, Clay Material, High Durability, Traditional And Classic Style Evian Studio 14380 P 0 0
24704 1998 Red & Blue Clay Necklace & Earrings, Small Round Shapes, Clay Material, High Durability, Traditional And Classic Style Evian Studio 14380 V 764 0
24705 1998 Red & Blue Clay Necklace & Earrings, Small Round Shapes, Clay Material, High Durability, Traditional And Classic Style Evian Studio 14380 V 764 0
33709 999 Mini Handmade Denim Fabric Wallet, Thick And Durable Denim Material, 3 Convenient Compartments, Simple And Elegant Design Nhà của Ran - Handmade&Embroidery 15624 P 0 5.00 1
33831 999 Mini Handmade Denim Fabric Wallet, Thick And Durable Denim Material, 3 Convenient Compartments, Simple And Elegant Design Nhà của Ran - Handmade&Embroidery 15624 V 33709 5.00 1
35912 999 Lili Summer Days Stone Bracelet LILI'S SUMMER BEADS 15771 P 0 5.00 2
35985 999 Lili Summer Days Stone Bracelet LILI'S SUMMER BEADS 15771 V 35912 5.00 2
36765 999 Scented Melt Wax, Pack of 6 ADORA 15887 P 0 0
37067 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37068 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37069 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37070 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37071 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37072 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37073 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37074 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37075 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37076 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37077 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37078 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37079 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37080 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37081 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37082 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37083 999 Scented Melt Wax, Pack of 6 ADORA 15887 V 36765 0
37420 1 Sleeping Cat Porcelain Figurine, Handmade Cat-Shaped Statue, Premium Glossy Glazed Ceramic, Decorating Office Or Study Desk Corners Art by Hang 15929 P 0 0
37438 1 Sleeping Cat Porcelain Figurine, Handmade Cat-Shaped Statue, Premium Glossy Glazed Ceramic, Decorating Office Or Study Desk Corners Art by Hang 15929 V 37420 0
37440 1 Sleeping Cat Porcelain Figurine, Handmade Cat-Shaped Statue, Premium Glossy Glazed Ceramic, Decorating Office Or Study Desk Corners Art by Hang 15929 V 37420 0
37413 1 Cat Tilting Head Porcelain Figurine, Handmade Ceramic Statue, Ideal For Decorating Study Or Work Desks, Charming Handmade Gift Art by Hang 15930 P 0 0
37441 1 Cat Tilting Head Porcelain Figurine, Handmade Ceramic Statue, Ideal For Decorating Study Or Work Desks, Charming Handmade Gift Art by Hang 15930 V 37413 0
37442 1 Cat Tilting Head Porcelain Figurine, Handmade Ceramic Statue, Ideal For Decorating Study Or Work Desks, Charming Handmade Gift Art by Hang 15930 V 37413 0
37443 1 Cat Tilting Head Porcelain Figurine, Handmade Ceramic Statue, Ideal For Decorating Study Or Work Desks, Charming Handmade Gift Art by Hang 15930 V 37413 0
37444 1 Cat Tilting Head Porcelain Figurine, Handmade Ceramic Statue, Ideal For Decorating Study Or Work Desks, Charming Handmade Gift Art by Hang 15930 V 37413 0
37445 1 Cat Tilting Head Porcelain Figurine, Handmade Ceramic Statue, Ideal For Decorating Study Or Work Desks, Charming Handmade Gift Art by Hang 15930 V 37413 0
38101 999 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 P 0 0
38241 999 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 V 38101 0
38242 999 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 V 38101 0
38243 999 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 V 38101 0
38244 999 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 V 38101 0
38245 999 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 V 38101 0
38246 998 Animal-shaped Wooden Hair Pins, Diverse Designs, Natural Wood Colors and Grain, Unique Hair Accessories, Made from Natural Materials VietArt 16064 V 38101 0
40532 999 Tutup Soft Round-shaped Fabric Wallet, Feminine Flap Pattern, Exquisite Pocket Lining, Simple Design, Spacious Bag Form, Sturdy Product Tomato Handmade 16310 P 0 0
40562 999 Tutup Soft Round-shaped Fabric Wallet, Feminine Flap Pattern, Exquisite Pocket Lining, Simple Design, Spacious Bag Form, Sturdy Product Tomato Handmade 16310 V 40532 0
40563 999 Tutup Soft Round-shaped Fabric Wallet, Feminine Flap Pattern, Exquisite Pocket Lining, Simple Design, Spacious Bag Form, Sturdy Product Tomato Handmade 16310 V 40532 0
40564 999 Tutup Soft Round-shaped Fabric Wallet, Feminine Flap Pattern, Exquisite Pocket Lining, Simple Design, Spacious Bag Form, Sturdy Product Tomato Handmade 16310 V 40532 0
40565 999 Tutup Soft Round-shaped Fabric Wallet, Feminine Flap Pattern, Exquisite Pocket Lining, Simple Design, Spacious Bag Form, Sturdy Product Tomato Handmade 16310 V 40532 0
40598 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
40597 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
40527 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 P 0 5.00 1
40592 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
40593 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
40594 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
40595 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
40596 999 Lazy Lady Fabric Wallet, Envelope Design, Cute Color Palette, Featuring 3 Convenient Compartments. Subtle Patterns, Feminine Accessory Tomato Handmade 16315 V 40527 5.00 1
41383 999 Wooden & Bead Stud Earrings, Warm Brown Tone of Wood, Bold Statement Earrings, Elegant Accent, Intricately Handcrafted Design Trâm cài tóc BHK Việt Nam 16479 P 0 5.00 1
41393 999 Wooden & Bead Stud Earrings, Warm Brown Tone of Wood, Bold Statement Earrings, Elegant Accent, Intricately Handcrafted Design Trâm cài tóc BHK Việt Nam 16479 V 41383 5.00 1
49203 999 Gift Box Of 4 “Deforest Symphony” Scented Soy Candle Tins, Gift a Symphony of Scents, Scented Candle Gift, Gift Ideas Chia Kandles 17248 V 49199 0
49202 999 Gift Box Of 4 “Deforest Symphony” Scented Soy Candle Tins, Gift a Symphony of Scents, Scented Candle Gift, Gift Ideas Chia Kandles 17248 V 49199 0
49201 999 Gift Box Of 4 “Deforest Symphony” Scented Soy Candle Tins, Gift a Symphony of Scents, Scented Candle Gift, Gift Ideas Chia Kandles 17248 V 49199 0
49200 999 Gift Box Of 4 “Deforest Symphony” Scented Soy Candle Tins, Gift a Symphony of Scents, Scented Candle Gift, Gift Ideas Chia Kandles 17248 V 49199 0
49199 999 Gift Box Of 4 “Deforest Symphony” Scented Soy Candle Tins, Gift a Symphony of Scents, Scented Candle Gift, Gift Ideas Chia Kandles 17248 P 0 0