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 = 'ar' 
  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 = 'ar' 
  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 (
    2359, 2812, 2832, 6380, 2827, 2833, 6381, 
    6379
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(174, f.categories_path) 
    OR FIND_IN_SET(329, f.categories_path) 
    OR FIND_IN_SET(337, f.categories_path) 
    OR FIND_IN_SET(372, f.categories_path) 
    OR FIND_IN_SET(453, f.categories_path) 
    OR FIND_IN_SET(455, f.categories_path) 
    OR FIND_IN_SET(527, 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 = 'ar' 
ORDER BY 
  fd.description, 
  fv.position

Query time 0.00354

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "73.66"
    },
    "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": 118,
            "rows_produced_per_join": 38,
            "filtered": "32.51",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (2359,2812,2832,6380,2827,2833,6381,6379)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'ar')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "51.27",
              "eval_cost": "3.84",
              "prefix_cost": "55.11",
              "data_read_per_join": "29K"
            },
            "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": 3,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "9.59",
              "eval_cost": "0.37",
              "prefix_cost": "68.54",
              "data_read_per_join": "1K"
            },
            "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(174,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(329,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(337,`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(453,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(455,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(527,`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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.91",
              "eval_cost": "0.37",
              "prefix_cost": "69.82",
              "data_read_per_join": "8K"
            },
            "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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.91",
              "eval_cost": "0.37",
              "prefix_cost": "71.10",
              "data_read_per_join": "4K"
            },
            "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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.91",
              "eval_cost": "0.37",
              "prefix_cost": "72.38",
              "data_read_per_join": "11K"
            },
            "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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.91",
              "eval_cost": "0.37",
              "prefix_cost": "73.66",
              "data_read_per_join": "1K"
            },
            "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
6381 659 8173 S Connectivity Bluetooth, HDMI ARC 0 152
2359 659 2741 S Connectivity Bluetooth 5.0, NFC pairing, HDMI IN/OUT (eARC), optical, coaxial, USB 0 152
2832 659 3253 S Connectivity HDMI (eARC), optical, USB, Bluetooth 5.0, Wi-Fi, AirPlay 2, Chromecast, voice assistants. 0 152
2833 659 3254 S Connectivity HDMI (eARC), optical, USB, Bluetooth 5.0, Wi-Fi, AirPlay 2, Chromecast, voice assistants 0 152
6380 659 8173 S Connectivity Bluetooth, HDMI ARC 0 152
2812 659 3210 S Connectivity HDMI eARC, Wi-Fi, Bluetooth, AirPlay, Alexa Multi Room Music, and Chromecast built in. 0 152
2827 659 3251 S Connectivity HDMI (eARC), optical, USB-A, AUX, Bluetooth 5.0, Wi-Fi, AirPlay 2, Chromecast, voice assistants. 0 152
6379 659 8173 S Connectivity Bluetooth, HDMI ARC 0 152
2827 649 3249 S Display LED display 0 20
2833 649 3249 S Display LED display 0 20
2832 649 3249 S Display LED display 0 20
6379 649 0.00 8175 S Display LED 0 20
6380 649 0.00 8177 S Display LED indicators 0 20
2812 649 3249 S Display LED display 0 20
6381 649 0.00 8175 S Display LED 0 20
2359 649 2740 S Display Dot-matrix OLED 0 20
6379 695 8174 S Max Load Capacity 860W 0 0
6381 695 8178 S Max Load Capacity 500W 0 0
6380 695 8176 S Max Load Capacity 200W 0 0
2833 695 4516 S Max Load Capacity 820 W (540 W soundbar + 280 W subwoofer) 0 0
2832 695 3957 S Max Load Capacity 880 W (440 W soundbar + 140 W surrounds + 300 W subwoofer 0 0
2359 695 2739 S Max Load Capacity 430 W (180 W soundbar + 250 W subwoofer) 0 0
2827 695 3250 S Max Load Capacity 720 W (440 W soundbar + 280 W subwoofer) 0 0
2812 695 3248 S Max Load Capacity 590 W (290 W soundbar + 300 W subwoofer) 0 0
2359 656 1560 S لون Black 0 160
6381 656 1560 S لون Black 0 160
2812 656 1560 S لون Black 0 160
6380 656 1560 S لون Black 0 160
2827 656 1560 S لون Black 0 160
6379 656 1560 S لون Black 0 160
2832 656 1560 S لون Black 0 160
2833 656 1560 S لون Black 0 160
2827 657 3006 E ماركة JBL 0 0
6379 657 6214 E ماركة TCL 0 0
6380 657 6214 E ماركة TCL 0 0
2812 657 3006 E ماركة JBL 0 0
2832 657 3006 E ماركة JBL 0 0
2833 657 3006 E ماركة JBL 0 0
6381 657 6214 E ماركة TCL 0 0
2359 657 1666 E ماركة Xiaomi 0 0