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 (
    8492, 8487, 8503, 8505, 8496, 8489, 2465
  ) 
  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(190, f.categories_path) 
    OR FIND_IN_SET(372, f.categories_path) 
    OR FIND_IN_SET(453, f.categories_path) 
    OR FIND_IN_SET(454, 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.00397

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "146.27"
    },
    "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": "product_id",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 238,
            "rows_produced_per_join": 77,
            "filtered": "32.51",
            "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (8492,8487,8503,8505,8496,8489,2465))",
            "cost_info": {
              "read_cost": "101.12",
              "eval_cost": "7.74",
              "prefix_cost": "108.86",
              "data_read_per_join": "59K"
            },
            "used_columns": [
              "feature_id",
              "product_id",
              "variant_id",
              "value",
              "value_int",
              "lang_code"
            ],
            "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'ar') and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))"
          }
        },
        {
          "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": 7,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "19.35",
              "eval_cost": "0.74",
              "prefix_cost": "135.94",
              "data_read_per_join": "3K"
            },
            "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(190,`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(454,`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": 7,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.84",
              "eval_cost": "0.74",
              "prefix_cost": "138.53",
              "data_read_per_join": "16K"
            },
            "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": 7,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.84",
              "eval_cost": "0.74",
              "prefix_cost": "141.11",
              "data_read_per_join": "8K"
            },
            "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": 7,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.84",
              "eval_cost": "0.74",
              "prefix_cost": "143.69",
              "data_read_per_join": "22K"
            },
            "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": 7,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.84",
              "eval_cost": "0.74",
              "prefix_cost": "146.27",
              "data_read_per_join": "3K"
            },
            "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
8492 641 1647 S Aspect Ratio 16:9 0 30
8505 641 1647 S Aspect Ratio 16:9 0 30
8489 641 1647 S Aspect Ratio 16:9 0 30
8487 641 1647 S Aspect Ratio 16:9 0 30
8503 641 1647 S Aspect Ratio 16:9 0 30
8496 641 1647 S Aspect Ratio 16:9 0 30
2465 641 1647 S Aspect Ratio 16:9 0 30
8489 659 2596 S Connectivity Bluetooth 5.0, Wi-Fi 2.4GHz/5GHz 0 152
8489 664 2864 S Frequency Bands Dual-band 2.4GHz/5GHz 0 230
8492 664 2864 S Frequency Bands Dual-band 2.4GHz/5GHz 0 230
8489 652 2586 S GPU Mali-G52 MC1 0 80
8487 652 2586 S GPU Mali-G52 MC1 0 80
2465 652 2586 S GPU Mali-G52 MC1 0 80
8492 652 2586 S GPU Mali-G52 MC1 0 80
8489 640 2584 S Operating System Google TV 0 10
8492 640 2584 S Operating System Google TV 0 10
8496 640 1926 S Operating System Tizen OS 0 10
8487 640 2584 S Operating System Google TV 0 10
2465 640 2584 S Operating System Google TV 0 10
8503 640 1926 S Operating System Tizen OS 0 10
8505 640 1926 S Operating System Tizen OS 0 10
8496 645 1929 S Ports 3 HDMI, 2 USB-A, 1 LAN, 1 × Digital Audio, 1 × RF Input 0 110
8492 645 2888 S Ports 3 x HDMI (1 with eARC), 2 x USB 2.0, 1 x Ethernet, 1 x Optical Audio Out, 1 x Composite In (AV), 1 x CI+ Slot, 1 x 3.5mm Headphone Jack 0 110
8489 645 3007 S Ports 1 x AC power socket, 1 x RF (antenna) socket, 2 × HDMI 2.0, 1 x HDMI 2.1, 1 x USB, 1 x Ethernet (LAN RJ45), 1 x Optical (Toslink) audio out, 1 x AV (composite input) 3-in-1, 1 x CI+ card slot 0 110
8503 645 1935 S Ports 4 HDMI, 2 USB-A, 1 LAN, 1 Digital Audio, 1 RF Input 0 110
2465 645 2894 S Ports 3 × HDMI (1 with eARC), 2 × USB 2.0, 1 × Ethernet (LAN), 1 × Optical Digital Audio Out, 1 × Composite AV In, 1 × CI Slot, 1 × 3.5 mm headphone jack 0 110
8487 645 2887 S Ports 3 x HDMI, 2 x USB, 1 x Ethernet, 1 x Optical Audio Out, 1 x AV Input, 1 x RF Input, 1 x Headphone Jack 0 110
8505 645 1935 S Ports 4 HDMI, 2 USB-A, 1 LAN, 1 Digital Audio, 1 RF Input 0 110
8492 666 2866 S Power Support 200 – 240 V AC, 50/60 Hz 0 250
8489 666 2866 S Power Support 200 – 240 V AC, 50/60 Hz 0 250
2465 651 2585 S Processor Quad-core A55 0 60
8492 651 2585 S Processor Quad-core A55 0 60
8505 651 1934 S Processor Quantum Processor 4K with AI Upscaling 0 60
8489 651 2863 S Processor Quad cortex A55 0 60
8487 651 2585 S Processor Quad-core A55 0 60
8503 651 1934 S Processor Quantum Processor 4K with AI Upscaling 0 60
8496 651 1928 S Processor Crystal Processor 4K 0 60
8487 643 1711 S Ram 2GB 0 70
8492 643 1711 S Ram 2GB 0 70
8489 643 1711 S Ram 2GB 0 70
2465 643 1711 S Ram 2GB 0 70
2465 650 1539 S Refresh Rate 60Hz 0 40
8503 650 1733 S Refresh Rate 100Hz 0 40
8496 650 1927 S Refresh Rate 55" model: 60Hz, 75", "85" model: 120Hz 0 40
8489 650 1539 S Refresh Rate 60Hz 0 40
8487 650 1539 S Refresh Rate 60Hz 0 40
8492 650 1539 S Refresh Rate 60Hz 0 40
8505 650 1733 S Refresh Rate 100Hz 0 40
8496 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
8492 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
2465 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
8503 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
8487 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
8505 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
8489 642 1590 S Resolution 3840 x 2160 (4K UHD) 0 50
8492 766 8551 S Tv Display 50 0 0
8496 766 8557 S Tv Display 55" 0 0
8489 766 8557 S Tv Display 55" 0 0
8487 766 8557 S Tv Display 55" 0 0
2465 766 8558 S Tv Display 65" 0 0
8505 766 8553 S Tv Display 75" 0 0
8503 766 8556 S Tv Display 85" 0 0
8489 662 1946 S Wi-Fi Standard Wi-Fi 6 (802.11ax) 0 210
8492 648 2588 S التخزين 8GB 0 170
8489 648 2588 S التخزين 8GB 0 170
2465 648 1888 S التخزين 16GB 0 170
8496 656 1560 S لون Black 0 160
8505 656 1560 S لون Black 0 160
2465 656 2077 S لون Grey 0 160
8487 656 1889 S لون Dark Gray 0 160
8503 656 1560 S لون Black 0 160
8489 656 1560 S لون Black 0 160
8492 656 1560 S لون Black 0 160
8503 657 1667 E ماركة Samsung 0 0
8489 657 1666 E ماركة Xiaomi 0 0
8487 657 1666 E ماركة Xiaomi 0 0
8492 657 1666 E ماركة Xiaomi 0 0
8496 657 1667 E ماركة Samsung 0 0
8505 657 1667 E ماركة Samsung 0 0
2465 657 1666 E ماركة Xiaomi 0 0