SELECT 
  v.product_id, 
  v.feature_id, 
  v.value, 
  v.value_int, 
  v.variant_id, 
  f.feature_type, 
  fd.description, 
  fd.prefix, 
  fd.suffix, 
  vd.variant, 
  f.parent_id, 
  f.position, 
  gf.position as gposition 
FROM 
  cscart_product_features as f 
  LEFT JOIN cscart_product_features_values as v ON v.feature_id = f.feature_id 
  LEFT JOIN cscart_product_features_descriptions as fd ON fd.feature_id = v.feature_id 
  AND fd.lang_code = 'en' 
  LEFT JOIN cscart_product_feature_variants fv ON fv.variant_id = v.variant_id 
  LEFT JOIN cscart_product_feature_variant_descriptions as vd ON vd.variant_id = fv.variant_id 
  AND vd.lang_code = 'en' 
  LEFT JOIN cscart_product_features as gf ON gf.feature_id = f.parent_id 
  AND gf.feature_type = 'G' 
WHERE 
  f.status IN ('A') 
  AND v.product_id in (
    5540, 5570, 5260, 5642, 5108, 5110, 5569, 
    5576, 5256, 5257, 5200, 5118, 5106, 
    5189, 5115, 5181, 5672, 5646, 5675, 
    5674, 5103
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(250, f.categories_path) 
    OR FIND_IN_SET(372, f.categories_path) 
    OR FIND_IN_SET(552, f.categories_path) 
    OR FIND_IN_SET(553, f.categories_path) 
    OR FIND_IN_SET(555, f.categories_path) 
    OR FIND_IN_SET(557, f.categories_path) 
    OR FIND_IN_SET(560, f.categories_path) 
    OR FIND_IN_SET(562, f.categories_path)
  ) 
  AND IF(
    f.parent_id, 
    (
      SELECT 
        status 
      FROM 
        cscart_product_features as df 
      WHERE 
        df.feature_id = f.parent_id
    ), 
    'A'
  ) IN ('A') 
  AND (
    v.variant_id != 0 
    OR (
      f.feature_type != 'C' 
      AND v.value != ''
    ) 
    OR (f.feature_type = 'C') 
    OR v.value_int != ''
  ) 
  AND v.lang_code = 'en' 
ORDER BY 
  fd.description, 
  fv.position

Query time 0.00425

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "243.88"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "v",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY",
              "fl",
              "variant_id",
              "lang_code",
              "product_id",
              "fpl",
              "idx_product_feature_variant_id"
            ],
            "key": "idx_product_feature_variant_id",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 393,
            "rows_produced_per_join": 127,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (5540,5570,5260,5642,5108,5110,5569,5576,5256,5257,5200,5118,5106,5189,5115,5181,5672,5646,5675,5674,5103)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "169.33",
              "eval_cost": "12.78",
              "prefix_cost": "182.11",
              "data_read_per_join": "98K"
            },
            "used_columns": [
              "feature_id",
              "product_id",
              "variant_id",
              "value",
              "value_int",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "f",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "feature_id"
            ],
            "key_length": "3",
            "ref": [
              "softwarepirmam_hewadelivard_cscart_4.v.feature_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 12,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "31.95",
              "eval_cost": "1.22",
              "prefix_cost": "226.84",
              "data_read_per_join": "5K"
            },
            "used_columns": [
              "feature_id",
              "feature_type",
              "categories_path",
              "parent_id",
              "display_on_catalog",
              "status",
              "position"
            ],
            "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`f`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`f`.`display_on_catalog` = 'Y') and ((`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path` = '') or (0 <> find_in_set(250,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(372,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(552,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(553,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(555,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(557,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(560,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(562,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`))) and (if(`softwarepirmam_hewadelivard_cscart_4`.`f`.`parent_id`,(/* select#2 */ select `softwarepirmam_hewadelivard_cscart_4`.`df`.`status` from `softwarepirmam_hewadelivard_cscart_4`.`cscart_product_features` `df` where (`softwarepirmam_hewadelivard_cscart_4`.`df`.`feature_id` = `softwarepirmam_hewadelivard_cscart_4`.`f`.`parent_id`)),'A') = 'A') and ((`softwarepirmam_hewadelivard_cscart_4`.`v`.`variant_id` <> 0) or ((`softwarepirmam_hewadelivard_cscart_4`.`f`.`feature_type` <> 'C') and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`value` <> '')) or (`softwarepirmam_hewadelivard_cscart_4`.`f`.`feature_type` = 'C') or (`softwarepirmam_hewadelivard_cscart_4`.`v`.`value_int` <> 0)))",
            "attached_subqueries": [
              {
                "dependent": true,
                "cacheable": false,
                "query_block": {
                  "select_id": 2,
                  "cost_info": {
                    "query_cost": "0.35"
                  },
                  "table": {
                    "table_name": "df",
                    "access_type": "eq_ref",
                    "possible_keys": [
                      "PRIMARY"
                    ],
                    "key": "PRIMARY",
                    "used_key_parts": [
                      "feature_id"
                    ],
                    "key_length": "3",
                    "ref": [
                      "softwarepirmam_hewadelivard_cscart_4.f.parent_id"
                    ],
                    "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": "440"
                    },
                    "used_columns": [
                      "feature_id",
                      "status"
                    ]
                  }
                }
              }
            ]
          }
        },
        {
          "table": {
            "table_name": "fd",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "feature_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "softwarepirmam_hewadelivard_cscart_4.v.feature_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.04",
              "eval_cost": "1.22",
              "prefix_cost": "231.10",
              "data_read_per_join": "27K"
            },
            "used_columns": [
              "feature_id",
              "description",
              "prefix",
              "suffix",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "fv",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "variant_id"
            ],
            "key_length": "3",
            "ref": [
              "softwarepirmam_hewadelivard_cscart_4.v.variant_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.04",
              "eval_cost": "1.22",
              "prefix_cost": "235.36",
              "data_read_per_join": "13K"
            },
            "used_columns": [
              "variant_id",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "vd",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "variant_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "softwarepirmam_hewadelivard_cscart_4.fv.variant_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.04",
              "eval_cost": "1.22",
              "prefix_cost": "239.62",
              "data_read_per_join": "36K"
            },
            "used_columns": [
              "variant_id",
              "variant",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "gf",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "feature_id"
            ],
            "key_length": "3",
            "ref": [
              "softwarepirmam_hewadelivard_cscart_4.f.parent_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.04",
              "eval_cost": "1.22",
              "prefix_cost": "243.88",
              "data_read_per_join": "5K"
            },
            "used_columns": [
              "feature_id",
              "feature_type",
              "position"
            ],
            "attached_condition": "<if>(is_not_null_compl(gf), (`softwarepirmam_hewadelivard_cscart_4`.`gf`.`feature_type` = 'G'), true)"
          }
        }
      ]
    }
  }
}

Result

product_id feature_id value value_int variant_id feature_type description prefix suffix variant parent_id position gposition
5103 754 70.00 6803 S Blend Type 70% Arabica, 30% Robusta 0 0
5106 754 6809 S Blend Type 60% Arabica, 40% Robusta 0 0
5108 754 6845 S Blend Type 50% Arabica, 50% Robusta 0 0
5110 754 6812 S Blend Type 100% Arabica 0 0
5115 754 6803 S Blend Type 70% Arabica, 30% Robusta 0 0
5118 754 6812 S Blend Type 100% Arabica 0 0
5181 754 6842 S Blend Type Powdered Hot Chocolate 0 0
5189 754 6809 S Blend Type 60% Arabica, 40% Robusta 0 0
5200 754 6853 S Blend Type 40% Arabica, 60% Robusta 0 0
5256 754 6812 S Blend Type 100% Arabica 0 0
5257 754 6812 S Blend Type 100% Arabica 0 0
5260 754 6853 S Blend Type 40% Arabica, 60% Robusta 0 0
5540 754 7367 S Blend Type 70% Robusta. 30% Arabica 0 0
5569 754 7377 S Blend Type Instant powdered cappuccino mix (caramel flavor) 0 0
5570 754 7381 S Blend Type Instant powdered cappuccino drink mix, flavored with hazelnut 0 0
5576 754 7401 S Blend Type Black tea blend with saffron 0 0
5642 754 7469 S Blend Type Black tea blend with natural peach flavor 0 0
5646 754 7476 S Blend Type Premium chocolate drink mix (cocoa powder blend) 0 0
5672 754 7476 S Blend Type Premium chocolate drink mix (cocoa powder blend) 0 0
5674 754 7499 S Blend Type Instant cappuccino mix (coffee and milk powder blend 0 0
5675 754 7502 S Blend Type Instant lemon-flavored black tea blend 0 0
5103 657 6802 E Brand Bristot 0 0
5106 657 6802 E Brand Bristot 0 0
5108 657 6802 E Brand Bristot 0 0
5110 657 6802 E Brand Bristot 0 0
5115 657 6802 E Brand Bristot 0 0
5118 657 6802 E Brand Bristot 0 0
5181 657 6802 E Brand Bristot 0 0
5189 657 6849 E Brand Trucillo 0 0
5200 657 6849 E Brand Trucillo 0 0
5256 657 6856 E Brand Illy 0 0
5257 657 6856 E Brand Illy 0 0
5260 657 6861 E Brand Lavazza 0 0
5540 657 7340 E Brand DARKOFF 0 0
5569 657 7340 E Brand DARKOFF 0 0
5570 657 7340 E Brand DARKOFF 0 0
5576 657 7340 E Brand DARKOFF 0 0
5642 657 7340 E Brand DARKOFF 0 0
5646 657 7346 E Brand Satro 0 0
5672 657 7346 E Brand Satro 0 0
5674 657 7346 E Brand Satro 0 0
5675 657 7346 E Brand Satro 0 0
5103 752 0.00 6804 S Coffee Type Whole Beans 0 0
5106 752 6804 S Coffee Type Whole Beans 0 0
5108 752 6804 S Coffee Type Whole Beans 0 0
5110 752 6804 S Coffee Type Whole Beans 0 0
5115 752 6804 S Coffee Type Whole Beans 0 0
5118 752 6804 S Coffee Type Whole Beans 0 0
5181 752 6843 S Coffee Type Powder 0 0
5189 752 6804 S Coffee Type Whole Beans 0 0
5200 752 6804 S Coffee Type Whole Beans 0 0
5256 752 6804 S Coffee Type Whole Beans 0 0
5257 752 6804 S Coffee Type Whole Beans 0 0
5260 752 6804 S Coffee Type Whole Beans 0 0
5540 752 6804 S Coffee Type Whole Beans 0 0
5569 752 7378 S Coffee Type Instant mix (contains coffee + flavoring + creamer) 0 0
5570 752 7382 S Coffee Type Instant mix (coffee + creamer + flavoring) 0 0
5674 752 7500 S Coffee Type Instant coffee 0 0
5103 755 0.00 6805 S Flavor Notes Chocolate, Caramel, Nutty 0 0
5106 755 6805 S Flavor Notes Chocolate, Caramel, Nutty 0 0
5108 755 6846 S Flavor Notes Chocolate, Caramel, Spicy 0 0
5110 755 6825 S Flavor Notes Dark Chocolate, Roasted Nuts, Caramel 0 0
5115 755 6835 S Flavor Notes Chocolate, Caramel, Hazelnut 0 0
5118 755 6805 S Flavor Notes Chocolate, Caramel, Nutty 0 0
5181 755 6844 S Flavor Notes Creamy, Sweet, Chocolatey 0 0
5189 755 6805 S Flavor Notes Chocolate, Caramel, Nutty 0 0
5200 755 6846 S Flavor Notes Chocolate, Caramel, Spicy 0 0
5256 755 6854 S Flavor Notes Caramel, Toasted Bread, Floral Undertones 0 0
5257 755 6854 S Flavor Notes Caramel, Toasted Bread, Floral Undertones 0 0
5260 755 6862 S Flavor Notes Chocolate, Dried Fruits, Spices 0 0
5540 755 7337 S Flavor Notes Rich chocolate, caramel, maybe nutty or smoky undertones 0 0
5569 755 7379 S Flavor Notes Caramel / sweet twist on cappuccino taste 0 0
5570 755 7383 S Flavor Notes Hazelnut sweetness & creaminess; nutty flavor blended with the classic cappuccino taste 0 0
5576 755 7402 S Flavor Notes Smooth black tea, delicate saffron, subtle floral and slightly sweet undertones 0 0
5642 755 7470 S Flavor Notes Juicy peach, fruity sweetness, smooth black tea, light floral hints 0 0
5646 755 7477 S Flavor Notes Rich cocoa, creamy texture, balanced sweetness, smooth finish 0 0
5672 755 7494 S Flavor Notes Smooth cocoa, creamy texture, light sweetness, balanced finish 0 0
5674 755 7501 S Flavor Notes Aromatic coffee, creamy milk, smooth texture, balanced sweetness 0 0
5675 755 7503 S Flavor Notes Zesty lemon, bright citrus, smooth black tea, light sweetness 0 0
5103 740 9.00 6806 S Intensity 9/10 0 0
5106 740 6810 S Intensity 8/10 0 0
5108 740 6806 S Intensity 9/10 0 0
5110 740 6810 S Intensity 8/10 0 0
5115 740 6806 S Intensity 9/10 0 0
5118 740 6836 S Intensity 4/10 0 0
5189 740 6806 S Intensity 9/10 0 0
5200 740 6830 S Intensity 10/10 0 0
5256 740 6814 S Intensity 7/10 0 0
5257 740 6814 S Intensity 7/10 0 0
5260 740 6810 S Intensity 8/10 0 0
5540 740 7338 S Intensity Strong / high intensity 0 0
5569 740 7380 S Intensity Mild to moderate (not very strong—more sweet-creamy) 0 0
5570 740 7384 S Intensity Mild to moderate (not strong) — more about flavor than bitterness 0 0
5576 740 7206 S Intensity Medium 0 0
5642 740 7206 S Intensity Medium 0 0
5646 740 7478 S Intensity Medium to high 0 0
5672 740 7495 S Intensity Medium (lighter chocolate profile compared to stronger blends) 0 0
5674 740 7206 S Intensity Medium 0 0
5675 740 7206 S Intensity Medium 0 0
5103 753 0.00 6807 S Roast Level Medium-Dark 0 0
5106 753 0.00 6811 S Roast Level Medium 0 0
5108 753 6807 S Roast Level Medium-Dark 0 0
5110 753 0.00 6826 S Roast Level Dark 0 0
5115 753 6807 S Roast Level Medium-Dark 0 0
5118 753 6811 S Roast Level Medium 0 0
5189 753 6807 S Roast Level Medium-Dark 0 0
5200 753 6826 S Roast Level Dark 0 0
5256 753 6811 S Roast Level Medium 0 0
5257 753 6811 S Roast Level Medium 0 0
5260 753 6811 S Roast Level Medium 0 0
5540 753 0.00 7339 S Roast Level Dark roast 0 0
5674 753 7207 S Roast Level Medium roast 0 0
5103 756 1.00 6808 S Weight 1kg 0 0
5106 756 6808 S Weight 1kg 0 0
5108 756 6808 S Weight 1kg 0 0
5110 756 6808 S Weight 1kg 0 0
5115 756 6808 S Weight 1kg 0 0
5118 756 500.00 6837 S Weight 500g 0 0
5181 756 6808 S Weight 1kg 0 0
5200 756 6808 S Weight 1kg 0 0
5256 756 6855 S Weight 1.5kg 0 0
5257 756 6839 S Weight 250g 0 0
5260 756 6808 S Weight 1kg 0 0
5540 756 6808 S Weight 1kg 0 0
5569 756 6808 S Weight 1kg 0 0
5570 756 6808 S Weight 1kg 0 0
5576 756 6808 S Weight 1kg 0 0
5642 756 6808 S Weight 1kg 0 0
5646 756 6808 S Weight 1kg 0 0
5672 756 6808 S Weight 1kg 0 0
5674 756 6808 S Weight 1kg 0 0
5675 756 6808 S Weight 1kg 0 0