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 (
    1406, 1266, 1428, 1263, 1256, 1319, 1273, 
    4526, 4767, 4744
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(234, f.categories_path) 
    OR FIND_IN_SET(326, 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.00629

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "252.06"
    },
    "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": 411,
            "rows_produced_per_join": 133,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (1406,1266,1428,1263,1256,1319,1273,4526,4767,4744)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "174.10",
              "eval_cost": "13.36",
              "prefix_cost": "187.46",
              "data_read_per_join": "103K"
            },
            "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": 12,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "33.41",
              "eval_cost": "1.27",
              "prefix_cost": "234.23",
              "data_read_per_join": "5K"
            },
            "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(234,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(326,`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": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.18",
              "eval_cost": "1.27",
              "prefix_cost": "238.69",
              "data_read_per_join": "28K"
            },
            "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": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.18",
              "eval_cost": "1.27",
              "prefix_cost": "243.15",
              "data_read_per_join": "14K"
            },
            "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": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.18",
              "eval_cost": "1.27",
              "prefix_cost": "247.60",
              "data_read_per_join": "38K"
            },
            "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": 12,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.18",
              "eval_cost": "1.27",
              "prefix_cost": "252.06",
              "data_read_per_join": "5K"
            },
            "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
1256 653 1736 S Battery 5000mAh 0 100
1263 653 1815 S Battery 4,000mAh 0 100
1266 653 1736 S Battery 5000mAh 0 100
1273 653 1840 S Battery 4,400mAh 0 100
1319 653 1736 S Battery 5000mAh 0 100
1406 653 1818 S Battery 4,700mAh 0 100
1428 653 1736 S Battery 5000mAh 0 100
4526 653 2107 S Battery 5,000 mAh 0 100
4744 653 1736 S Battery 5000mAh 0 100
4767 653 1736 S Battery 5000mAh 0 100
1256 657 1667 E Brand Samsung 0 0
1263 657 1667 E Brand Samsung 0 0
1266 657 1667 E Brand Samsung 0 0
1273 657 1667 E Brand Samsung 0 0
1319 657 1667 E Brand Samsung 0 0
1406 657 1667 E Brand Samsung 0 0
1428 657 1667 E Brand Samsung 0 0
4526 657 1667 E Brand Samsung 0 0
4744 657 1667 E Brand Samsung 0 0
4767 657 1667 E Brand Samsung 0 0
1256 654 1538 S Charging Type USB Type-C Fast Charging 0 120
1263 654 1538 S Charging Type USB Type-C Fast Charging 0 120
1266 654 1538 S Charging Type USB Type-C Fast Charging 0 120
1273 654 1538 S Charging Type USB Type-C Fast Charging 0 120
1319 654 1538 S Charging Type USB Type-C Fast Charging 0 120
1406 654 1709 S Charging Type Charging via USB‑C 0 120
1428 654 1538 S Charging Type USB Type-C Fast Charging 0 120
4526 654 1538 S Charging Type USB Type-C Fast Charging 0 120
4744 654 1538 S Charging Type USB Type-C Fast Charging 0 120
4767 654 5998 S Charging Type 25W fast charging 0 120
1256 656 1560 S Color Black 0 160
1263 656 1787 S Color Amber Yellow 0 160
1273 656 1778 S Color Shiny Silver 0 160
1319 656 1751 S Color Awesome Light Gray 0 160
1428 656 1781 S Color Wonderful Navy 0 160
4767 656 1559 S Color white 0 160
1266 656 1554 S Color Black Titanium 0 160
4526 656 1554 S Color Black Titanium 0 160
4744 656 1737 S Color Lavender Awesome 0 160
1406 656 1775 S Color Mint 0 160
1256 649 1517 S Display 6.7" 0 20
1263 649 1756 S Display 6.2" 0 20
1266 649 1537 S Display 6.8" 0 20
1273 649 8932 S Display 7.6" 0 20
1319 649 1517 S Display 6.7" 0 20
1406 649 1517 S Display 6.7" 0 20
1428 649 1800 S Display 6.6" 0 20
4526 649 1515 S Display 6.9" 0 20
4744 649 1517 S Display 6.7" 0 20
4767 649 1517 S Display 6.7" 0 20
1256 647 1799 S Front Camera 8MP 0 150
1263 647 1546 S Front Camera 12MP 0 150
1266 647 1546 S Front Camera 12MP 0 150
1273 647 1841 S Front Camera 4mp+10mp 0 150
1319 647 1546 S Front Camera 12MP 0 150
1406 647 1820 S Front Camera 10MP 0 150
1428 647 1574 S Front Camera 32MP 0 150
4526 647 1546 S Front Camera 12MP 0 150
4744 647 1546 S Front Camera 12MP 0 150
4767 647 1804 S Front Camera 13MP 0 150
1256 652 1797 S GPU Mali-G52 MC2 0 80
1263 652 1814 S GPU Xclipse 940 0 80
1266 652 1822 S GPU Adreno 750 0 80
1273 652 1817 S GPU Adreno 740 0 80
1319 652 1812 S GPU Xclipse 540 0 80
1406 652 1817 S GPU Adreno 740 0 80
1428 652 1809 S GPU - 0 80
4526 652 1827 S GPU Adreno 830 0 80
4744 652 1807 S GPU Adreno 710 0 80
4767 652 1803 S GPU Mali-G68 MP5 0 80
1256 640 1794 S Operating System Android 14 0 10
1263 640 1794 S Operating System Android 14 0 10
1266 640 1794 S Operating System Android 14 0 10
1273 640 1794 S Operating System Android 14 0 10
1319 640 1805 S Operating System Android 15 0 10
1406 640 1794 S Operating System Android 14 0 10
1428 640 1794 S Operating System Android 14 0 10
4526 640 1805 S Operating System Android 15 0 10
4744 640 1805 S Operating System Android 15 0 10
1256 651 1796 S Processor MediaTek Helio G85 0 60
1263 651 1813 S Processor Exynos 2400 0 60
1266 651 1551 S Processor Snapdragon 8 Gen 3 0 60
1273 651 1551 S Processor Snapdragon 8 Gen 3 0 60
1319 651 1811 S Processor Exynos 1580 0 60
1406 651 1813 S Processor Exynos 2400 0 60
1428 651 1808 S Processor Octa-Core 0 60
4526 651 1826 S Processor Snapdragon 8 Elite 0 60
4744 651 1806 S Processor Snapdragon 6 Gen 3 0 60
4767 651 1802 S Processor Exynos 1380 0 60
1256 643 1684 S Ram 4GB 0 70
4767 643 1591 S Ram 6GB 0 70
1263 643 1526 S Ram 8GB 0 70
1319 643 1526 S Ram 8GB 0 70
1406 643 1526 S Ram 8GB 0 70
1428 643 1526 S Ram 8GB 0 70
4744 643 1526 S Ram 8GB 0 70
1266 643 1587 S Ram 12GB 0 70
1273 643 1587 S Ram 12GB 0 70
4526 643 1587 S Ram 12GB 0 70
1256 655 1846 S Rear Camera 50MP+2MP 0 140
1263 655 1816 S Rear Camera 50MP+10MP+12MP 0 140
1266 655 1823 S Rear Camera 200MP+12MP+10MP+50MP 0 140
1273 655 1829 S Rear Camera 50MP+12MP+10MP 0 140
1319 655 1810 S Rear Camera 50MP+12MP+5MP 0 140
1406 655 1819 S Rear Camera 50MP+12MP+8MP 0 140
1428 655 1810 S Rear Camera 50MP+12MP+5MP 0 140
4526 655 1828 S Rear Camera 200MP+50MP+10MP+10MP 0 140
4744 655 1845 S Rear Camera 50MP+8MP+5MP 0 140
4767 655 5999 S Rear Camera 50MP+8MP+2MP 0 140
1256 650 1539 S Refresh Rate 60Hz 0 40
1263 650 1540 S Refresh Rate 120Hz 0 40
1266 650 1540 S Refresh Rate 120Hz 0 40
1273 650 1540 S Refresh Rate 120Hz 0 40
1319 650 1540 S Refresh Rate 120Hz 0 40
1406 650 1540 S Refresh Rate 120Hz 0 40
1428 650 1540 S Refresh Rate 120Hz 0 40
4526 650 1540 S Refresh Rate 120Hz 0 40
4744 650 1540 S Refresh Rate 120Hz 0 40
4767 650 1540 S Refresh Rate 120Hz 0 40
1256 642 1795 S Resolution 720-by-1600-pi 0 50
1263 642 1801 S Resolution 1080-by-2340-pixel 0 50
1266 642 1821 S Resolution 1440-by-3088-pixel 0 50
1273 642 1843 S Resolution 2160-by-1856-pixel Main display, 2316-by-904-pixel Cover display 0 50
1319 642 1801 S Resolution 1080-by-2340-pixel 0 50
1406 642 1801 S Resolution 1080-by-2340-pixel 0 50
1428 642 1801 S Resolution 1080-by-2340-pixel 0 50
4526 642 1824 S Resolution 1440-by-3120-pixel 0 50
4744 642 1801 S Resolution 1080-by-2340-pixel 0 50
4767 642 1801 S Resolution 1080-by-2340-pixel 0 50
1256 644 1798 S SIM Dual Nano-SIM 0 90
1263 644 1664 S SIM Dual SIM 0 90
1266 644 1664 S SIM Dual SIM 0 90
1273 644 1664 S SIM Dual SIM 0 90
1319 644 1664 S SIM Dual SIM 0 90
1406 644 1664 S SIM Dual SIM 0 90
1428 644 1664 S SIM Dual SIM 0 90
4526 644 1664 S SIM Dual SIM 0 90
4744 644 1798 S SIM Dual Nano-SIM 0 90
4767 644 1798 S SIM Dual Nano-SIM 0 90
1256 648 1687 S Storage 64GB 0 170
1263 648 1561 S Storage 128GB 0 170
1428 648 1561 S Storage 128GB 0 170
4744 648 1561 S Storage 128GB 0 170
4767 648 1561 S Storage 128GB 0 170
1266 648 1562 S Storage 256GB 0 170
1273 648 1562 S Storage 256GB 0 170
1319 648 1562 S Storage 256GB 0 170
1406 648 1562 S Storage 256GB 0 170
4526 648 1562 S Storage 256GB 0 170