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 (2321, 2386, 2392) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(378, f.categories_path) 
    OR FIND_IN_SET(379, 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.00143

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "40.83"
    },
    "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": 66,
            "rows_produced_per_join": 21,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (2321,2386,2392)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "28.31",
              "eval_cost": "2.15",
              "prefix_cost": "30.46",
              "data_read_per_join": "16K"
            },
            "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": 2,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "5.37",
              "eval_cost": "0.20",
              "prefix_cost": "37.97",
              "data_read_per_join": "899"
            },
            "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(166,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(378,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(379,`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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.51",
              "eval_cost": "0.20",
              "prefix_cost": "38.69",
              "data_read_per_join": "4K"
            },
            "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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.51",
              "eval_cost": "0.20",
              "prefix_cost": "39.40",
              "data_read_per_join": "2K"
            },
            "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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.51",
              "eval_cost": "0.20",
              "prefix_cost": "40.12",
              "data_read_per_join": "6K"
            },
            "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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.51",
              "eval_cost": "0.20",
              "prefix_cost": "40.83",
              "data_read_per_join": "899"
            },
            "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
2321 653 2618 S Battery 90,000mAh 0 100
2392 653 2420 S Battery 20,000mAh 0 100
2386 653 2420 S Battery 20,000mAh 0 100
2392 657 2082 E Brand Anker 0 0
2321 657 2082 E Brand Anker 0 0
2386 657 2082 E Brand Anker 0 0
2321 654 2624 S Charging Type Fast charging via dual 140 W USB‑C (up to 280 W total), AC, solar (100 W max), or car inlet 0 120
2392 654 2811 S Charging Type Fast wired charging via USB‑C PD and USB‑A 0 120
2386 654 2800 S Charging Type Fast wired charging with USB‑C Power Delivery (PD), plus USB‑A PowerIQ 0 120
2321 656 1889 S Color Dark Gray 0 160
2392 656 1560 S Color Black 0 160
2386 656 1560 S Color Black 0 160
2321 649 2622 S Display Smart color display showing real-time input/output (W), battery %, estimated runtime & recharge time 0 20
2392 649 2809 S Display Digital LED battery-level indicator 0 20
2386 649 2798 S Display Digital LED battery level indicator 0 20
2386 683 2801 S Input USB‑C port, up to 30 W 0 310
2321 683 2625 S Input Dual USB‑C: 280 W combined, AC inlet: up to 330 W (bypass 380 W), Solar: 11–28 V, 8.2 A (100 W max) 0 310
2392 683 2812 S Input USB‑C up to 65 W, fully recharges in about 1.5 hours using a 65 W charger 0 310
2386 684 2802 S Output Built-in USB‑C cable (fixed), 1 × USB‑C port, 1 × USB‑A port 0 320
2321 684 2626 S Output 300 W continuous (600 W surge) 0 320
2392 684 2813 S Output Built-in USB‑C cable: up to 65 W, USB‑C port: shares remaining power in the 87 W budget, USB‑A port: output via PowerIQ (typically 18W) 0 320
2392 645 2810 S Ports Integrated built-in USB‑C cable (fixed), 1 × USB‑C port, 1 × USB‑A port 0 110
2386 645 2799 S Ports Built-in USB‑C cable (fixed), 1 × USB‑C port (PD), 1 × USB‑A port (PowerIQ) 0 110
2321 645 2623 S Ports 3 × USB‑C (2 × 140 W bi-directional, 1 × 100 W), 1 × USB‑C (15 W), 1 × USB‑A (12 W), 3 × AC outlets (pure sine wave), 1 × 120 W DC car socket 0 110