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 (247, 2107, 2110, 2113, 2249, 2247) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(322, f.categories_path) 
    OR FIND_IN_SET(340, 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.00325

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "96.23"
    },
    "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": 156,
            "rows_produced_per_join": 50,
            "filtered": "32.51",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (247,2107,2110,2113,2249,2247)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'ar')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "66.64",
              "eval_cost": "5.07",
              "prefix_cost": "71.71",
              "data_read_per_join": "39K"
            },
            "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": 4,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "12.68",
              "eval_cost": "0.48",
              "prefix_cost": "89.46",
              "data_read_per_join": "2K"
            },
            "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(322,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(340,`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": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.21",
              "eval_cost": "0.48",
              "prefix_cost": "91.15",
              "data_read_per_join": "10K"
            },
            "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": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.21",
              "eval_cost": "0.48",
              "prefix_cost": "92.85",
              "data_read_per_join": "5K"
            },
            "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": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.21",
              "eval_cost": "0.48",
              "prefix_cost": "94.54",
              "data_read_per_join": "14K"
            },
            "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": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.21",
              "eval_cost": "0.48",
              "prefix_cost": "96.23",
              "data_read_per_join": "2K"
            },
            "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
2249 654 1722 S Charging Type Magnetic Charging 0 120
2247 654 1897 S Charging Type Magnetic charging cable 0 120
2107 654 1897 S Charging Type Magnetic charging cable 0 120
247 654 1722 S Charging Type Magnetic Charging 0 120
2113 654 1897 S Charging Type Magnetic charging cable 0 120
2110 654 1897 S Charging Type Magnetic charging cable 0 120
2247 670 2427 S Compatibility only supports smartphones with Android 8.0 and above, iOS 12.0 and above 0 115
2110 659 2242 S Connectivity Bluetooth® 5.3, NFC, eSIM support 0 152
2107 659 2236 S Connectivity Bluetooth 5.3, NFC, eSIM support 0 152
2247 659 2429 S Connectivity Bluetooth® 5.3 0 152
2113 659 2248 S Connectivity Bluetooth® 5.3, Bluetooth calling with dual-mic noise reduction 0 152
2107 649 2232 S Display 1.43" 0 20
2110 649 2238 S Display 2.07" 0 20
2113 649 2244 S Display 1.96" 0 20
2249 649 2232 S Display 1.43" 0 20
247 649 1719 S Display 1.74" 0 20
2247 649 2424 S Display 2" 0 20
2113 640 1629 S Operating System HyperOS 0 10
2247 640 1629 S Operating System HyperOS 0 10
2110 640 1629 S Operating System HyperOS 0 10
2249 640 1882 S Operating System Wear OS 4 0 10
2107 640 1620 S Operating System HyperOS 2 0 10
247 640 1718 S Operating System MI Band OS 0 10
2249 643 1711 S Ram 2GB 0 70
2107 650 1539 S Refresh Rate 60Hz 0 40
2110 650 1539 S Refresh Rate 60Hz 0 40
2247 642 2425 S Resolution 320 x 385 0 50
2249 642 2430 S Resolution 466x 466 0 50
247 642 1720 S Resolution 336 x 480 0 50
2110 642 2239 S Resolution 432 × 514 pixels 0 50
2107 642 2233 S Resolution 466 x 466 pixels 0 50
2113 642 2245 S Resolution 410 × 502 pixels 0 50
247 646 1723 S Sensor Accelerometer, Gyroscope, Electronic compass, Optical heart rate and pulse oximeter, Ambient light sensor 0 130
2110 646 2241 S Sensor Heart rate sensor (with blood oxygen sensor), Accelerometer, Gyroscope, Ambient light sensor, Electronic compass 0 130
2247 646 2428 S Sensor Heart rate sensor (with blood oxygen sensor), Accelerometer 0 130
2249 646 2432 S Sensor Optical heart rate sensor, Accelerometer sensor, Gyroscope sensor, Ambient light sensor, Electronic compass sensor, Barometer sensor 0 130
2107 646 2235 S Sensor Heart rate monitor, SpO2 sensor, Accelerometer, Gyroscope, Compass, Barometer 0 130
2113 646 2247 S Sensor Heart rate sensor with blood oxygen monitoring, Accelerometer, Gyroscope, Ambient light sensor, Electronic compass 0 130
2249 648 2433 S التخزين 2GB 0 170
2113 653 2246 S باتري 470mAh 0 100
2249 653 2431 S باتري 495mAh, Up to 65 hours of usage time 0 100
247 653 1721 S باتري 350mAh 0 100
2110 653 2240 S باتري 550mAh, up to 24 days of typical usage 0 100
2247 653 2426 S باتري 470 mAh, up to 18 days of typical usage 0 100
2107 653 2234 S باتري 486 mAh, up to 15 days of typical usage 0 100
2247 656 1599 S لون Midnight Black 0 160
2249 656 1653 S لون Titan Grey 0 160
247 656 1724 S لون Obsidian Black 0 160
2107 656 2231 S لون Rainbow 0 160
2113 656 2243 S لون Light Gold 0 160
2110 656 1724 S لون Obsidian Black 0 160
247 657 1666 E ماركة Xiaomi 0 0
2247 657 1666 E ماركة Xiaomi 0 0
2107 657 1666 E ماركة Xiaomi 0 0
2113 657 1666 E ماركة Xiaomi 0 0
2110 657 1666 E ماركة Xiaomi 0 0
2249 657 1666 E ماركة Xiaomi 0 0