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 (
    4577, 4578, 4630, 4631, 4556, 4607, 4633, 
    4634
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(167, f.categories_path) 
    OR FIND_IN_SET(355, 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.00438

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "201.77"
    },
    "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": 329,
            "rows_produced_per_join": 106,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (4577,4578,4630,4631,4556,4607,4633,4634)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "139.36",
              "eval_cost": "10.70",
              "prefix_cost": "150.06",
              "data_read_per_join": "82K"
            },
            "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": 10,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "26.74",
              "eval_cost": "1.02",
              "prefix_cost": "187.50",
              "data_read_per_join": "4K"
            },
            "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(167,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(355,`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": 10,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.55",
              "eval_cost": "1.02",
              "prefix_cost": "191.07",
              "data_read_per_join": "23K"
            },
            "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": 10,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.55",
              "eval_cost": "1.02",
              "prefix_cost": "194.64",
              "data_read_per_join": "11K"
            },
            "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": 10,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.55",
              "eval_cost": "1.02",
              "prefix_cost": "198.20",
              "data_read_per_join": "30K"
            },
            "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": 10,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.55",
              "eval_cost": "1.02",
              "prefix_cost": "201.77",
              "data_read_per_join": "4K"
            },
            "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
4556 641 1647 S Aspect Ratio 16:9 0 30
4577 641 2070 S Aspect Ratio 16:10 0 30
4578 641 1647 S Aspect Ratio 16:9 0 30
4607 641 1647 S Aspect Ratio 16:9 0 30
4630 641 2070 S Aspect Ratio 16:10 0 30
4631 641 2070 S Aspect Ratio 16:10 0 30
4633 641 2070 S Aspect Ratio 16:10 0 30
4634 641 2070 S Aspect Ratio 16:10 0 30
4556 653 5655 S Battery 42 Wh 0 100
4577 653 5655 S Battery 42 Wh 0 100
4578 653 5703 S Battery 8Wh / 56Wh (varies by configuration) 0 100
4607 653 5753 S Battery 90 Wh 0 100
4630 653 5753 S Battery 90 Wh 0 100
4631 653 5753 S Battery 90 Wh 0 100
4633 653 5753 S Battery 90 Wh 0 100
4634 653 5753 S Battery 90 Wh 0 100
4556 657 5650 E Brand Asus 0 0
4577 657 5650 E Brand Asus 0 0
4578 657 5650 E Brand Asus 0 0
4607 657 5650 E Brand Asus 0 0
4630 657 5650 E Brand Asus 0 0
4631 657 5650 E Brand Asus 0 0
4633 657 5650 E Brand Asus 0 0
4634 657 5650 E Brand Asus 0 0
4556 656 1607 S Color silver 0 160
4577 656 1560 S Color Black 0 160
4578 656 1560 S Color Black 0 160
4607 656 2077 S Color Grey 0 160
4630 656 2077 S Color Grey 0 160
4631 656 1560 S Color Black 0 160
4633 656 2077 S Color Grey 0 160
4634 656 5835 S Color Off Black 0 160
4556 659 5657 S Connectivity Wi-Fi 5, Bluetooth 5.1 0 152
4577 659 2288 S Connectivity Wi-Fi 6, Bluetooth 5.1 0 152
4578 659 2288 S Connectivity Wi-Fi 6, Bluetooth 5.1 0 152
4607 659 4071 S Connectivity Wi-Fi 6, Bluetooth 5.2 0 152
4630 659 4153 S Connectivity Wi-Fi 6E, Bluetooth 5.3 0 152
4631 659 4153 S Connectivity Wi-Fi 6E, Bluetooth 5.3 0 152
4633 659 4084 S Connectivity Wi-Fi 7, Bluetooth 5.4 0 152
4634 659 4084 S Connectivity Wi-Fi 7, Bluetooth 5.4 0 152
4556 649 2250 S Display 15.6" 0 20
4578 649 2250 S Display 15.6" 0 20
4607 649 2250 S Display 15.6" 0 20
4630 649 5820 S Display 18" 0 20
4634 649 5820 S Display 18" 0 20
4577 649 2137 S Display 16" 0 20
4631 649 2137 S Display 16" 0 20
4633 649 2137 S Display 16" 0 20
4556 647 2287 S Front Camera 720p HD webcam with privacy shutter 0 150
4577 647 2287 S Front Camera 720p HD webcam with privacy shutter 0 150
4578 647 2254 S Front Camera 720p HD webcam 0 150
4607 647 2254 S Front Camera 720p HD webcam 0 150
4630 647 4184 S Front Camera 1080p FHD webcam with privacy shutter 0 150
4631 647 4184 S Front Camera 1080p FHD webcam with privacy shutter 0 150
4633 647 4184 S Front Camera 1080p FHD webcam with privacy shutter 0 150
4634 647 4184 S Front Camera 1080p FHD webcam with privacy shutter 0 150
4556 652 5654 S GPU Intel Iris Xe Graphics 0 80
4577 652 5681 S GPU Integrated AMD Radeon Graphics 0 80
4578 652 5702 S GPU NVIDIA GeForce RTX 2050, 4GB GDDR6 0 80
4607 652 5761 S GPU NVIDIA GeForce RTX 4050, 6GB GDDR6 0 80
4630 652 5822 S GPU NVIDIA GeForce RTX 5070 8GB GDDR7 0 80
4631 652 5817 S GPU NVIDIA GeForce RTX 5070 Ti 12GB GDDR7 0 80
4633 652 5829 S GPU NVIDIA® GeForce RTX™ 5080 Laptop GPU with 16GB GDDR7, ROG Boost up to 175W 0 80
4634 652 5833 S GPU NVIDIA® GeForce RTX™ 5090 Laptop GPU with 24GB GDDR7, ROG Boost up to 175W 0 80
4556 640 2274 S Operating System Windows 11 Pro 0 10
4577 640 2274 S Operating System Windows 11 Pro 0 10
4578 640 5698 S Operating System Windows 11 Home / Pro (varies by region) 0 10
4607 640 5705 S Operating System Windows 11 Home / Pro 0 10
4630 640 2274 S Operating System Windows 11 Pro 0 10
4631 640 2274 S Operating System Windows 11 Pro 0 10
4633 640 2274 S Operating System Windows 11 Pro 0 10
4634 640 2274 S Operating System Windows 11 Pro 0 10
4556 645 5656 S Ports 1 × USB-A 2.0, 2 × USB-A 3.2 Gen 1, 1 × USB-C 3.2 Gen 1, 1 × HDMI 1.4, 1 × 3.5mm combo audio jack, 1 × DC-in 0 110
4577 645 5682 S Ports 2 × USB-A 3.2 Gen 1, 1 × USB-C 3.2 Gen 1, 1 × USB-A 2.0, 1 × HDMI 1.4, 1 × 3.5mm combo audio jack, 1 × DC-in 0 110
4578 645 5704 S Ports 2 × USB-A 3.2 Gen 1, 1 × USB-C 3.2 Gen 2 (supports DisplayPort 1.4, G-SYNC), 1 × USB-C 3.2 Gen 2 (supports Power Delivery + DisplayPort), 1 × HDMI 2.0b, 1 × RJ-45 LAN port, 1 × 3.5mm combo audio jack 0 110
4607 645 5762 S Ports 2 × USB-A 3.2 Gen 1, 1 × USB-C 3.2 Gen 2 (supports DisplayPort & G-SYNC), 1 × USB-C 3.2 Gen 2 (supports Power Delivery + DisplayPort), 1 × HDMI 2.1, 1 × RJ-45 LAN port , 1 × 3.5mm combo audio jack 0 110
4630 645 5823 S Ports 1 × USB‑C 3.2 Gen 2 (Power Delivery, DisplayPort 1.4), 2 × USB‑A 3.2 Gen 1, 1 × HDMI 2.1, 1 × RJ‑45 Ethernet, 1 × SD card reader 1 × Headphone/mic combo jack 0 110
4631 645 5825 S Ports 1 × USB-C 3.2 Gen 2 (Power Delivery, DisplayPort 1.4), 2 × USB-A 3.2 Gen ,2 1 × HDMI 2.1, 1 × RJ-45 Ethernet, 1 × SD card reader, 1 × Headphone/mic combo jack 0 110
4633 645 5830 S Ports 1 × USB-C 3.2 Gen 2 (Power Delivery, DisplayPort 1.4), 2 × USB-A 3.2 Gen 1, 1 × HDMI 2.1, 1 × RJ-45 Ethernet, 1 × SD card reader, 1 × headphone/mic combo jack 0 110
4634 645 5834 S Ports 2 × USB-C 3.2 Gen 2 (Power Delivery, DisplayPort 1.4), 2 × USB-A 3.2 Gen 1, 1 × HDMI 2.1, 1 × RJ-45 Ethernet, 1 × SD card reader, 1 × headphone/mic combo jack 0 110
4556 651 2854 S Processor Intel® Core™ i7 0 60
4630 651 5378 S Processor Intel® Core™ Ultra 9 0 60
4631 651 5378 S Processor Intel® Core™ Ultra 9 0 60
4633 651 5378 S Processor Intel® Core™ Ultra 9 0 60
4634 651 5378 S Processor Intel® Core™ Ultra 9 0 60
4577 651 5700 S Processor AMD Ryzen 7 0 60
4578 651 5700 S Processor AMD Ryzen 7 0 60
4607 651 5700 S Processor AMD Ryzen 7 0 60
4556 643 1526 S Ram 8GB 0 70
4577 643 1592 S Ram 16GB 0 70
4578 643 1592 S Ram 16GB 0 70
4607 643 1592 S Ram 16GB 0 70
4630 643 1592 S Ram 16GB 0 70
4631 643 2117 S Ram 32GB 0 70
4633 643 2117 S Ram 32GB 0 70
4634 643 3038 S Ram 64GB 0 70
4556 650 5347 S Refresh Rate 60 Hz 0 40
4577 650 5218 S Refresh Rate 60 Hz 0 40
4578 650 1541 S Refresh Rate 144Hz 0 40
4607 650 1541 S Refresh Rate 144Hz 0 40
4630 650 1541 S Refresh Rate 144Hz 0 40
4631 650 1542 S Refresh Rate 165Hz 0 40
4633 650 1544 S Refresh Rate 240Hz 0 40
4634 650 1544 S Refresh Rate 240Hz 0 40
4556 642 1588 S Resolution 1920 x 1080 (full HD) 0 50
4577 642 5678 S Resolution 1920 x 1200 (WUXGA) 0 50
4578 642 5699 S Resolution 1920 × 1080 (Full HD) 0 50
4607 642 1588 S Resolution 1920 x 1080 (full HD) 0 50
4630 642 2275 S Resolution 1920 x 1200 0 50
4631 642 2275 S Resolution 1920 x 1200 0 50
4633 642 2987 S Resolution 2560 x 1600 0 50
4634 642 2987 S Resolution 2560 x 1600 0 50
4556 648 1563 S Storage 512GB 0 170
4577 648 1563 S Storage 512GB 0 170
4578 648 1563 S Storage 512GB 0 170
4607 648 1563 S Storage 512GB 0 170
4630 648 1563 S Storage 512GB 0 170
4631 648 1564 S Storage 1TB 0 170
4633 648 1564 S Storage 1TB 0 170
4634 648 1564 S Storage 1TB 0 170