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 (
    1553, 1552, 1557, 1554, 1560, 1556, 1561, 
    1558
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(328, f.categories_path) 
    OR FIND_IN_SET(359, f.categories_path) 
    OR FIND_IN_SET(360, f.categories_path) 
    OR FIND_IN_SET(250, f.categories_path) 
    OR FIND_IN_SET(402, f.categories_path) 
    OR FIND_IN_SET(407, f.categories_path) 
    OR FIND_IN_SET(412, 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.00280

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "123.44"
    },
    "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": 200,
            "rows_produced_per_join": 65,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (1553,1552,1557,1554,1560,1556,1561,1558)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "85.51",
              "eval_cost": "6.50",
              "prefix_cost": "92.01",
              "data_read_per_join": "50K"
            },
            "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": 6,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "16.26",
              "eval_cost": "0.62",
              "prefix_cost": "114.77",
              "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(328,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(359,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(360,`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(402,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(407,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(412,`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": 6,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.55",
              "eval_cost": "0.62",
              "prefix_cost": "116.94",
              "data_read_per_join": "14K"
            },
            "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": 6,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.55",
              "eval_cost": "0.62",
              "prefix_cost": "119.11",
              "data_read_per_join": "7K"
            },
            "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": 6,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.55",
              "eval_cost": "0.62",
              "prefix_cost": "121.28",
              "data_read_per_join": "18K"
            },
            "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": 6,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.55",
              "eval_cost": "0.62",
              "prefix_cost": "123.44",
              "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
1561 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1556 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1554 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1552 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1557 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1560 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1553 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1558 667 1951 S Antenna Type Built-in Smart Antennas 0 260
1552 657 1945 E Brand Huawei 0 0
1556 657 1945 E Brand Huawei 0 0
1557 657 1945 E Brand Huawei 0 0
1554 657 1945 E Brand Huawei 0 0
1558 657 1945 E Brand Huawei 0 0
1560 657 1945 E Brand Huawei 0 0
1553 657 1945 E Brand Huawei 0 0
1561 657 1945 E Brand Huawei 0 0
1553 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1558 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1560 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1554 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1557 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1561 664 1973 S Frequency Bands Tri Bands 2.4 GHz, 5 GHz, and 6GHz 0 230
1552 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1556 664 1948 S Frequency Bands Dual Bands 2.4 GHz and 5 GHz 0 230
1558 669 1964 S Maximum Device Rate Up to 6.575 Gbps 0 280
1557 669 1954 S Maximum Device Rate Up to 2.975 Gbps 0 280
1560 669 1968 S Maximum Device Rate Up to 3.57 Gbps 0 280
1556 669 1953 S Maximum Device Rate Up to 1.775 Gbps 0 280
1561 669 1976 S Maximum Device Rate Up to 13.66 Gbps 0 280
1554 669 1954 S Maximum Device Rate Up to 2.975 Gbps 0 280
1552 669 1953 S Maximum Device Rate Up to 1.775 Gbps 0 280
1553 669 1954 S Maximum Device Rate Up to 2.975 Gbps 0 280
1552 668 1952 S Maximum User Capacity 128 access users 0 270
1560 668 1967 S Maximum User Capacity 256 access users 0 270
1556 668 1952 S Maximum User Capacity 128 access users 0 270
1554 668 1952 S Maximum User Capacity 128 access users 0 270
1561 668 1975 S Maximum User Capacity 1024 access users 0 270
1558 668 1963 S Maximum User Capacity 1536 access users 0 270
1553 668 1952 S Maximum User Capacity 128 access users 0 270
1557 668 1952 S Maximum User Capacity 128 access users 0 270
1558 663 1960 S Mounting Options Wall, Ceiling, T-Rail 0 220
1561 663 1960 S Mounting Options Wall, Ceiling, T-Rail 0 220
1560 663 1960 S Mounting Options Wall, Ceiling, T-Rail 0 220
1553 663 1947 S Mounting Options Wall Plate, Junction Box 0 220
1554 663 1977 S Mounting Options Desk, Wall, Ceiling, Junction Box 0 220
1556 663 1960 S Mounting Options Wall, Ceiling, T-Rail 0 220
1557 663 1960 S Mounting Options Wall, Ceiling, T-Rail 0 220
1552 663 1947 S Mounting Options Wall Plate, Junction Box 0 220
1558 665 1949 S Network Ports 1 x GE (RJ45) (Uplink), 1 x GE (RJ45) (Downlink) 0 240
1556 665 1961 S Network Ports 1 x GE (RJ45) (Uplink) 0 240
1557 665 1961 S Network Ports 1 x GE (RJ45) (Uplink) 0 240
1553 665 1949 S Network Ports 1 x GE (RJ45) (Uplink), 1 x GE (RJ45) (Downlink) 0 240
1554 665 1978 S Network Ports 1 x GE (RJ45) (Uplink), 4 x GE (RJ45) (Downlink), 1 x POE Out 0 240
1561 665 1974 S Network Ports 1 x 5GE (RJ45) (Uplink), 1 x GE (RJ45) (Downlink), USB 2.0 0 240
1552 665 1949 S Network Ports 1 x GE (RJ45) (Uplink), 1 x GE (RJ45) (Downlink) 0 240
1560 665 1966 S Network Ports 1 x 2.5GE (RJ45) (Uplink) 0 240
1561 666 1962 S Power Support DC adapter, PoE 0 250
1552 666 1950 S Power Support PoE 0 250
1556 666 1950 S Power Support PoE 0 250
1554 666 1950 S Power Support PoE 0 250
1560 666 1962 S Power Support DC adapter, PoE 0 250
1553 666 1950 S Power Support PoE 0 250
1558 666 1962 S Power Support DC adapter, PoE 0 250
1557 666 1950 S Power Support PoE 0 250
1552 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210
1561 662 1965 S Wi-Fi Standard Wi-Fi 7 (802.11be) 0 210
1553 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210
1560 662 1965 S Wi-Fi Standard Wi-Fi 7 (802.11be) 0 210
1558 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210
1554 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210
1557 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210
1556 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210