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 (
    16945, 16930, 17262, 17260, 17258, 16946, 
    15862, 15855, 17253, 17252, 17249, 
    17248, 17247, 17246, 17242, 17241
  ) 
GROUP BY 
  products.product_id 
ORDER BY 
  NULL asc

Query time 0.01662

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": 73,
            "filtered": 100,
            "index_condition": "variation_group_products.group_id in (16945,16930,17262,17260,17258,16946,15862,15855,17253,17252,17249,17248,17247,17246,17242,17241)"
          }
        },
        {
          "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
36296 998 Mini Leather Wallet Keychain, Handmade Keychain, Cowhide Material, Cowhide Accessories, Multifunctional Key Chain, Personalized Gift Hoa handmade 15855 V 49251 5.00 6
49250 998 Mini Leather Wallet Keychain, Handmade Keychain, Cowhide Material, Cowhide Accessories, Multifunctional Key Chain, Personalized Gift Hoa handmade 15855 V 49251 5.00 6
49251 998 Mini Leather Wallet Keychain, Handmade Keychain, Cowhide Material, Cowhide Accessories, Multifunctional Key Chain, Personalized Gift Hoa handmade 15855 P 0 5.00 6
49252 998 Mini Leather Wallet Keychain, Handmade Keychain, Cowhide Material, Cowhide Accessories, Multifunctional Key Chain, Personalized Gift Hoa handmade 15855 V 49251 5.00 6
49249 998 Mini Leather Wallet Keychain, Handmade Keychain, Cowhide Material, Cowhide Accessories, Multifunctional Key Chain, Personalized Gift Hoa handmade 15855 V 49251 5.00 6
36306 999 Flippy Leather Wallet, Compact Design, Durable Cowhide, Elegant Gift, Leather Accessories, Handmade Gifts, Personalized Gift Hoa handmade 15862 V 49256 5.00 3
49256 999 Flippy Leather Wallet, Compact Design, Durable Cowhide, Elegant Gift, Leather Accessories, Handmade Gifts, Personalized Gift Hoa handmade 15862 P 0 5.00 3
49255 999 Flippy Leather Wallet, Compact Design, Durable Cowhide, Elegant Gift, Leather Accessories, Handmade Gifts, Personalized Gift Hoa handmade 15862 V 49256 5.00 3
49254 999 Flippy Leather Wallet, Compact Design, Durable Cowhide, Elegant Gift, Leather Accessories, Handmade Gifts, Personalized Gift Hoa handmade 15862 V 49256 5.00 3
49253 999 Flippy Leather Wallet, Compact Design, Durable Cowhide, Elegant Gift, Leather Accessories, Handmade Gifts, Personalized Gift Hoa handmade 15862 V 49256 5.00 3
46748 999 Genuine Leather Passport Holder 01, Peace Of Mind And Style For Your Travels, Compact And Convenient Design, Unique And Personalized Gift Freewill Leather 16930 V 49306 5.00 9
49306 999 Genuine Leather Passport Holder 01, Peace Of Mind And Style For Your Travels, Compact And Convenient Design, Unique And Personalized Gift Freewill Leather 16930 P 0 5.00 9
49305 999 Genuine Leather Passport Holder 01, Peace Of Mind And Style For Your Travels, Compact And Convenient Design, Unique And Personalized Gift Freewill Leather 16930 V 49306 5.00 9
49308 999 Mini Leather Wallet, Genuine Cowhide Material, Simple Design, Casual Style, Exquisite Craftsmanship, Compact Size Freewill Leather 16945 V 49309 0
46818 999 Mini Leather Wallet, Genuine Cowhide Material, Simple Design, Casual Style, Exquisite Craftsmanship, Compact Size Freewill Leather 16945 V 49309 0
49309 999 Mini Leather Wallet, Genuine Cowhide Material, Simple Design, Casual Style, Exquisite Craftsmanship, Compact Size Freewill Leather 16945 P 0 0
49265 999 Mini Leather Purse, Elegant Leather Wallet, Mini Wallet, Leather Accessories, Cowhide Material, Elegant Style, Personalized Gift Freewill Leather 16946 P 0 5.00 6
49266 999 Mini Leather Purse, Elegant Leather Wallet, Mini Wallet, Leather Accessories, Cowhide Material, Elegant Style, Personalized Gift Freewill Leather 16946 V 49265 5.00 6
49263 999 Mini Leather Purse, Elegant Leather Wallet, Mini Wallet, Leather Accessories, Cowhide Material, Elegant Style, Personalized Gift Freewill Leather 16946 V 49265 5.00 6
49164 19 Limited Edition Journal Made With Fabrics From Around The World, Fabric Notebook, A Touch Of Elegance To Your Every Memory, Handcrafted With Care Chus - Love from Vietnam 17241 P 0 5.00 10
49174 18 Limited Edition Journal Made With Fabrics From Around The World, Fabric Notebook, A Touch Of Elegance To Your Every Memory, Handcrafted With Care Chus - Love from Vietnam 17241 V 49164 5.00 10
49173 20 Limited Edition Journal Made With Fabrics From Around The World, Fabric Notebook, A Touch Of Elegance To Your Every Memory, Handcrafted With Care Chus - Love from Vietnam 17241 V 49164 5.00 10
49172 18 Limited Edition Journal Made With Fabrics From Around The World, Fabric Notebook, A Touch Of Elegance To Your Every Memory, Handcrafted With Care Chus - Love from Vietnam 17241 V 49164 5.00 10
49171 17 Limited Edition Journal Made With Fabrics From Around The World, Fabric Notebook, A Touch Of Elegance To Your Every Memory, Handcrafted With Care Chus - Love from Vietnam 17241 V 49164 5.00 10
46690 20 Long Leather Wallet, Elegant Leather Wallet, Long Wallet, Leather Accessories, Cowhide Material, Elegant Style, Personalized Gift Freewill Leather 17242 V 49169 5.00 9
49169 999 Long Leather Wallet, Elegant Leather Wallet, Long Wallet, Leather Accessories, Cowhide Material, Elegant Style, Personalized Gift Freewill Leather 17242 P 0 5.00 9
49170 999 Long Leather Wallet, Elegant Leather Wallet, Long Wallet, Leather Accessories, Cowhide Material, Elegant Style, Personalized Gift Freewill Leather 17242 V 49169 5.00 9
49659 100 Genuine Leather Cardholder, A Modern Masterpiece Of Handcrafted Durability, Compact Design, Convenient And Stylish, Personalized Cardholder, Gift Idea Freewill Leather 17246 V 49186 0
49186 100 Genuine Leather Cardholder, A Modern Masterpiece Of Handcrafted Durability, Compact Design, Convenient And Stylish, Personalized Cardholder, Gift Idea Freewill Leather 17246 P 0 0
49658 100 Genuine Leather Cardholder, A Modern Masterpiece Of Handcrafted Durability, Compact Design, Convenient And Stylish, Personalized Cardholder, Gift Idea Freewill Leather 17246 V 49186 0
3638 999 “Means To Me” Scented Soy Candle & Flower Gift Box, Perfect Gift For Any Occasion, Luxury On A Budget, Scented Candle Gift, Gift Idea Chia Kandles 17247 V 49192 5.00 3
49192 999 “Means To Me” Scented Soy Candle & Flower Gift Box, Perfect Gift For Any Occasion, Luxury On A Budget, Scented Candle Gift, Gift Idea Chia Kandles 17247 P 0 5.00 3
49194 999 “Means To Me” Scented Soy Candle & Flower Gift Box, Perfect Gift For Any Occasion, Luxury On A Budget, Scented Candle Gift, Gift Idea Chia Kandles 17247 V 49192 5.00 3
49193 999 “Means To Me” Scented Soy Candle & Flower Gift Box, Perfect Gift For Any Occasion, Luxury On A Budget, Scented Candle Gift, Gift Idea Chia Kandles 17247 V 49192 5.00 3
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
49219 999 Custom Printed Cookie Gift Box, Express Your Love With Sweetness, Unique Gifts For Any Occasion, Personalized Gifts For Everyone Mana House 17249 V 49221 0
49220 999 Custom Printed Cookie Gift Box, Express Your Love With Sweetness, Unique Gifts For Any Occasion, Personalized Gifts For Everyone Mana House 17249 V 49221 0
49221 999 Custom Printed Cookie Gift Box, Express Your Love With Sweetness, Unique Gifts For Any Occasion, Personalized Gifts For Everyone Mana House 17249 P 0 0
49225 1998 Bow-tie Hair Ties Hang Handmade 17252 P 0 0
49227 1998 Bow-tie Hair Ties Hang Handmade 17252 V 49225 0
49228 1998 Bow-tie Hair Ties Hang Handmade 17252 V 49225 0
49229 1998 Bow-tie Hair Ties Hang Handmade 17252 V 49225 0
49226 1998 Bow-tie Hair Ties Hang Handmade 17252 V 49225 0
49230 99 Hexagonal Ceramic Tea Set, Crystal Green Collection, Perfect Housewarming Gift, Handcrafted Vietnamese Tea Set, Meaningful Gift, Easy Care & Dishwasher Safe Gốm Đông Gia 17253 P 0 0
49323 99 Hexagonal Ceramic Tea Set, Crystal Green Collection, Perfect Housewarming Gift, Handcrafted Vietnamese Tea Set, Meaningful Gift, Easy Care & Dishwasher Safe Gốm Đông Gia 17253 V 49230 0
49300 1 Handmade Ceramic Fairy Lamp 1, Night Light, Ceramic Decorative Lamp, Unique Gift Little Sparks 17258 P 0 0
49302 1 Handmade Ceramic Fairy Lamp 3, Charming Ceramic Nightlight, Handcrafted With Love, Ceramic Decorative Lamp, Delicate Decoration, Unique Gift Little Sparks 17260 P 0 0
49304 10 Handmade Ceramic Fairy Lamp 5, Bring Twinkling Lights To Your Space, Night Light, Ceramic Decorative Lamp, Ceramic Decor, Unique Gift Little Sparks 17262 P 0 0
49390 10 Handmade Ceramic Fairy Lamp 5, Bring Twinkling Lights To Your Space, Night Light, Ceramic Decorative Lamp, Ceramic Decor, Unique Gift Little Sparks 17262 V 49304 0