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 (
    2775, 2767, 2562, 3548, 5151, 2786, 3408, 
    3744, 2733, 3359, 5126, 5133, 2759, 
    5137, 3375, 3517, 5143
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(329, f.categories_path) 
    OR FIND_IN_SET(344, 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.00503

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "178.52"
    },
    "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": 287,
            "rows_produced_per_join": 93,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (2775,2767,2562,3548,5151,2786,3408,3744,2733,3359,5126,5133,2759,5137,3375,3517,5143)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "124.08",
              "eval_cost": "9.33",
              "prefix_cost": "133.41",
              "data_read_per_join": "72K"
            },
            "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": 8,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "23.33",
              "eval_cost": "0.89",
              "prefix_cost": "166.07",
              "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(329,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(344,`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": 8,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.22",
              "eval_cost": "0.89",
              "prefix_cost": "169.18",
              "data_read_per_join": "20K"
            },
            "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": 8,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.22",
              "eval_cost": "0.89",
              "prefix_cost": "172.30",
              "data_read_per_join": "10K"
            },
            "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": 8,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.22",
              "eval_cost": "0.89",
              "prefix_cost": "175.41",
              "data_read_per_join": "26K"
            },
            "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": 8,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.22",
              "eval_cost": "0.89",
              "prefix_cost": "178.52",
              "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
2562 653 2981 S Battery Up to 7 hours of listening; 21 hours with the charging case, 10 minute fast charging 2 hours listening 0 100
2733 653 3085 S Battery 70 mAh, Up to 8 hours with Active Noise Cancelling on; up to 10 hours with ANC off; up to 40 hours with the charging case 0 100
2759 653 3117 S Battery 55mAh per earbud with up to 10 hours playback and a total of 48 hours including the charging case. 0 100
2767 653 3140 S Battery 50mAh per earbud with up to 6 hours playback and 24 hours total with charging case. 0 100
2775 653 3144 S Battery 6-6.5 hours of playback per charge, total of 25 hours with charging case; 10 minutes of charging provides 1 hour of playback 0 100
2786 653 3145 S Battery 65mAh per earbud, up to 10 hours of playback, with an additional 30 hours from the 750mAh charging case. 0 100
3359 653 3830 S Battery 60 mAh per earbud, 520 mAh case 0 100
3375 653 4617 S Battery 400 mAh per earbud 0 100
3408 653 4627 S Battery 55 mAh per earbud. 0 100
3517 653 4193 S Battery Up to 8 hours per charge, 31 hours with case. 0 100
3548 653 4260 S Battery Up to 28 hours total. 8 hours per charge for earbuds, 20 hours with charging case 0 100
3744 653 4709 S Battery 40mAh earbuds, 480mAh case; up to 6h per charge, 30h total with charging case 0 100
2562 657 2082 E Brand Anker 0 0
2733 657 3006 E Brand JBL 0 0
2759 657 3006 E Brand JBL 0 0
2767 657 3006 E Brand JBL 0 0
2775 657 2082 E Brand Anker 0 0
2786 657 3006 E Brand JBL 0 0
3359 657 3933 E Brand Belkin 0 0
3375 657 3933 E Brand Belkin 0 0
3408 657 3933 E Brand Belkin 0 0
3517 657 3933 E Brand Belkin 0 0
3548 657 3933 E Brand Belkin 0 0
3744 657 3933 E Brand Belkin 0 0
5126 657 6600 E Brand Philips 0 0
5133 657 6600 E Brand Philips 0 0
5137 657 6600 E Brand Philips 0 0
5143 657 6600 E Brand Philips 0 0
5151 657 6600 E Brand Philips 0 0
2562 654 2982 S Charging Type USB-C for earbuds and case 0 120
2733 654 3086 S Charging Type USB-C, requires approximately 2 hours to fully charge. A quick 10-minute charge provides about 2 hours of playback, 0 120
2759 654 3118 S Charging Type USB-C, takes about 2 hours for a full charge and provides up to 10 hours of playback per charge. 0 120
2767 654 3141 S Charging Type USB-C or wireless charging, offering up to 6 hours playback per charge and 24 hours total with the case. 0 120
2775 654 2462 S Charging Type USB-C fast charging 0 120
2786 654 3146 S Charging Type USB-C or Qi wireless, takes about 2 hours, offers up to 10 hours playback (plus 30 from the case). 0 120
3359 654 3831 S Charging Type USB-C and Qi wireless, 15 min charge gives 2 hrs playback. 0 120
3375 654 1771 S Charging Type USB-C 0 120
3408 654 3923 S Charging Type USB-C wired charging with Qi wireless charging support. 0 120
3517 654 4194 S Charging Type Uses hybrid active noise cancellation and touch controls. 0 120
3548 654 1771 S Charging Type USB-C 0 120
3744 654 4710 S Charging Type USB-C wired charging, 2h full charge 0 120
2562 656 1560 S Color Black 0 160
2733 656 1560 S Color Black 0 160
2759 656 2308 S Color Turquoise 0 160
2767 656 1560 S Color Black 0 160
2775 656 1559 S Color white 0 160
2786 656 1560 S Color Black 0 160
3359 656 1560 S Color Black 0 160
3375 656 3421 S Color Beige 0 160
3408 656 1560 S Color Black 0 160
3517 656 1559 S Color white 0 160
3548 656 1559 S Color white 0 160
3744 656 1559 S Color white 0 160
5126 656 1914 S Color Gray 0 160
5133 656 1560 S Color Black 0 160
5137 656 1560 S Color Black 0 160
5143 656 1560 S Color Black 0 160
5151 656 1560 S Color Black 0 160
2562 659 2983 S Connectivity Bluetooth 5.4 with up to 10 meters range 0 152
2733 659 3088 S Connectivity Bluetooth 5.2 , range of up to 10 meters 0 152
2759 659 3120 S Connectivity Bluetooth 5.3, up to 10 meters wireless range. 0 152
2767 659 3142 S Connectivity Bluetooth 5.2, up to 10 meters range. 0 152
2775 659 2774 S Connectivity Bluetooth 5.0, with a range of 10 meters 0 152
2786 659 3147 S Connectivity Bluetooth 5.2 with 10 m range 0 152
3359 659 3418 S Connectivity Bluetooth 5.2 0 152
3375 659 3418 S Connectivity Bluetooth 5.2 0 152
3408 659 1702 S Connectivity Bluetooth 5.3 0 152
3517 659 3418 S Connectivity Bluetooth 5.2 0 152
3548 659 1702 S Connectivity Bluetooth 5.3 0 152
3744 659 1702 S Connectivity Bluetooth 5.3 0 152
5126 659 3015 S Connectivity Bluetooth 0 152
5133 659 3015 S Connectivity Bluetooth 0 152
5137 659 3015 S Connectivity Bluetooth 0 152
5143 659 3015 S Connectivity Bluetooth 0 152
5151 659 3015 S Connectivity Bluetooth 0 152
2562 671 2113 S Headphone Ear Cup Types On-Ear 0 0
2759 671 2112 S Headphone Ear Cup Types In-Ear 0 0
2767 671 2112 S Headphone Ear Cup Types In-Ear 0 0
2775 671 2112 S Headphone Ear Cup Types In-Ear 0 0
2786 671 2112 S Headphone Ear Cup Types In-Ear 0 0
3359 671 2112 S Headphone Ear Cup Types In-Ear 0 0
3375 671 3934 S Headphone Ear Cup Types Open-Ear 0 0
3408 671 2112 S Headphone Ear Cup Types In-Ear 0 0
3517 671 2112 S Headphone Ear Cup Types In-Ear 0 0
3548 671 2112 S Headphone Ear Cup Types In-Ear 0 0
3744 671 2112 S Headphone Ear Cup Types In-Ear 0 0
5126 671 2112 S Headphone Ear Cup Types In-Ear 0 0
5133 671 2112 S Headphone Ear Cup Types In-Ear 0 0
5137 671 3934 S Headphone Ear Cup Types Open-Ear 0 0
5143 671 3934 S Headphone Ear Cup Types Open-Ear 0 0
5151 671 2112 S Headphone Ear Cup Types In-Ear 0 0
2759 683 3121 S Input USB-C charging, in ear sensors, multiple microphones 0 310
2759 684 3122 S Output JBL Pure Bass sound, clear audio with 10mm drivers 0 320
2562 651 2980 S Processor Bluetooth 5.4 chipset 0 60
2733 646 3087 S Sensor Touch sensitive controls and built in microphones for call clarity and noise cancellation. 0 130
2759 646 3119 S Sensor In ear detection sensors. 0 130
2767 646 3119 S Sensor In ear detection sensors. 0 130
2786 646 3119 S Sensor In ear detection sensors. 0 130
3359 646 3832 S Sensor In ear detection and dual mic environmental noise cancellation. 0 130
3375 646 3872 S Sensor Touch controls for playback, calls, and volume; no wear-detect sensor 0 130
3408 646 4864 S Sensor In-ear wear detection with auto pause/play. 0 130
3517 646 4636 S Sensor Touch controls with proximity and accelerometer sensors. 0 130
3548 646 4261 S Sensor Touch controls for playback, calls, and volume, no wear detect sensor 0 130
3744 646 4711 S Sensor Touch controls, active noise cancellation (ANC) 0 130