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 (
    3733, 3811, 3734, 3641, 3798, 3730, 3638, 
    3729, 3851, 3942, 3732, 3448, 3728, 
    3852, 3850, 3731, 3642, 3943, 3623, 
    3645, 3637, 3644, 3864, 3940, 3865, 
    3869, 3941
  ) 
  AND f.display_on_catalog = 'Y' 
  AND (
    f.categories_path = '' 
    OR FIND_IN_SET(166, f.categories_path) 
    OR FIND_IN_SET(423, f.categories_path) 
    OR FIND_IN_SET(449, 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.00472

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "190.73"
    },
    "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": 303,
            "rows_produced_per_join": 98,
            "filtered": "32.52",
            "index_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (3733,3811,3734,3641,3798,3730,3638,3729,3851,3942,3732,3448,3728,3852,3850,3731,3642,3943,3623,3645,3637,3644,3864,3940,3865,3869,3941)) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en')) and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))",
            "cost_info": {
              "read_cost": "133.26",
              "eval_cost": "9.85",
              "prefix_cost": "143.11",
              "data_read_per_join": "76K"
            },
            "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": 9,
            "filtered": "9.53",
            "cost_info": {
              "read_cost": "24.63",
              "eval_cost": "0.94",
              "prefix_cost": "177.59",
              "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(423,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(449,`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": 9,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.35",
              "eval_cost": "0.94",
              "prefix_cost": "180.88",
              "data_read_per_join": "21K"
            },
            "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": 9,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.35",
              "eval_cost": "0.94",
              "prefix_cost": "184.16",
              "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": 9,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.35",
              "eval_cost": "0.94",
              "prefix_cost": "187.45",
              "data_read_per_join": "28K"
            },
            "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": 9,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.35",
              "eval_cost": "0.94",
              "prefix_cost": "190.73",
              "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
3448 657 3961 E Brand Baykron 0 0
3623 657 3961 E Brand Baykron 0 0
3637 657 3961 E Brand Baykron 0 0
3638 657 3961 E Brand Baykron 0 0
3641 657 3961 E Brand Baykron 0 0
3642 657 3961 E Brand Baykron 0 0
3644 657 3961 E Brand Baykron 0 0
3645 657 3961 E Brand Baykron 0 0
3728 657 3961 E Brand Baykron 0 0
3729 657 3961 E Brand Baykron 0 0
3730 657 3961 E Brand Baykron 0 0
3731 657 3961 E Brand Baykron 0 0
3732 657 3961 E Brand Baykron 0 0
3733 657 3961 E Brand Baykron 0 0
3734 657 3961 E Brand Baykron 0 0
3798 657 3961 E Brand Baykron 0 0
3811 657 3961 E Brand Baykron 0 0
3850 657 3961 E Brand Baykron 0 0
3851 657 3961 E Brand Baykron 0 0
3852 657 3961 E Brand Baykron 0 0
3864 657 3961 E Brand Baykron 0 0
3865 657 3961 E Brand Baykron 0 0
3869 657 3961 E Brand Baykron 0 0
3940 657 3961 E Brand Baykron 0 0
3941 657 3961 E Brand Baykron 0 0
3942 657 3961 E Brand Baykron 0 0
3943 657 3961 E Brand Baykron 0 0
3448 656 3985 S Color Transparent 0 160
3623 656 3985 S Color Transparent 0 160
3637 656 3985 S Color Transparent 0 160
3638 656 3985 S Color Transparent 0 160
3641 656 3985 S Color Transparent 0 160
3642 656 3985 S Color Transparent 0 160
3644 656 3985 S Color Transparent 0 160
3645 656 3985 S Color Transparent 0 160
3728 656 3985 S Color Transparent 0 160
3729 656 3985 S Color Transparent 0 160
3730 656 3985 S Color Transparent 0 160
3731 656 1560 S Color Black 0 160
3732 656 1560 S Color Black 0 160
3733 656 1560 S Color Black 0 160
3734 656 1560 S Color Black 0 160
3798 656 1707 S Color Orange 0 160
3850 656 3985 S Color Transparent 0 160
3851 656 3985 S Color Transparent 0 160
3852 656 3985 S Color Transparent 0 160
3864 656 3985 S Color Transparent 0 160
3865 656 3985 S Color Transparent 0 160
3869 656 3985 S Color Transparent 0 160
3940 656 3985 S Color Transparent 0 160
3941 656 3985 S Color Transparent 0 160
3942 656 3985 S Color Transparent 0 160
3943 656 3985 S Color Transparent 0 160
3811 656 1558 S Color Pink 0 160
3869 718 3979 S Edge Coverage Case Friendly 0 0
3869 719 3982 S Finish Clear 0 0
3448 721 4686 S Functional Features MagSafe compatible, supports wireless charging, passive heat dissipation 0 0
3623 721 4686 S Functional Features MagSafe compatible, supports wireless charging, passive heat dissipation 0 0
3637 721 4686 S Functional Features MagSafe compatible, supports wireless charging, passive heat dissipation 0 0
3638 721 4686 S Functional Features MagSafe compatible, supports wireless charging, passive heat dissipation 0 0
3641 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3642 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3644 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3645 721 4690 S Functional Features Supports wireless charging, provides passive heat dissipation (no kickstand/wallet/cardholder) 0 0
3728 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3729 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3730 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3731 721 0.00 4701 S Functional Features Supports wireless charging 0 0
3732 721 4701 S Functional Features Supports wireless charging 0 0
3733 721 4701 S Functional Features Supports wireless charging 0 0
3734 721 4703 S Functional Features Includes carabiner for easy carrying, supports wired and wireless charging without removing the case 0 0
3798 721 4740 S Functional Features Protects against scratches and drops, maintains access to magnetic charging and pairing 0 0
3811 721 4752 S Functional Features Securely holds Apple Pencil, easy to attach to bags or cases, protects against loss and damage 0 0
3850 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3851 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3852 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3864 721 4686 S Functional Features MagSafe compatible, supports wireless charging, passive heat dissipation 0 0
3865 721 4688 S Functional Features Supports wireless charging, passive heat dissipation 0 0
3940 721 0.00 4908 S Functional Features Supports wireless charging, shock-absorbing bumper edges, passive heat dissipation for device protection 0 0
3941 721 4908 S Functional Features Supports wireless charging, shock-absorbing bumper edges, passive heat dissipation for device protection 0 0
3942 721 0.00 4910 S Functional Features MagSafe compatible, supports wireless charging, shock-absorbing bumper edges, passive heat dissipation for device protection 0 0
3943 721 4910 S Functional Features MagSafe compatible, supports wireless charging, shock-absorbing bumper edges, passive heat dissipation for device protection 0 0
3448 720 4687 S Material & Build Quality TPU edges and polycarbonate back, glossy clear finish, anti-slip grip, antibacterial & anti-yellow coating 0 0
3623 720 4687 S Material & Build Quality TPU edges and polycarbonate back, glossy clear finish, anti-slip grip, antibacterial & anti-yellow coating 0 0
3637 720 4687 S Material & Build Quality TPU edges and polycarbonate back, glossy clear finish, anti-slip grip, antibacterial & anti-yellow coating 0 0
3638 720 4687 S Material & Build Quality TPU edges and polycarbonate back, glossy clear finish, anti-slip grip, antibacterial & anti-yellow coating 0 0
3641 720 4689 S Material & Build Quality TPU and polycarbonate, glossy clear finish, anti-slip texture, antibacterial & anti-yellow coating 0 0
3642 720 4689 S Material & Build Quality TPU and polycarbonate, glossy clear finish, anti-slip texture, antibacterial & anti-yellow coating 0 0
3644 720 4689 S Material & Build Quality TPU and polycarbonate, glossy clear finish, anti-slip texture, antibacterial & anti-yellow coating 0 0
3645 720 4691 S Material & Build Quality Clear TPU/polycarbonate combination (Baykron Tough Clear material), with anti‑yellowing and antibacterial treatment, slim shock‑resistant design 0 0
3728 720 4700 S Material & Build Quality TPU and polycarbonate, clear sturdy design, glossy finish with anti-slip texture, antibacterial and anti-yellow coating 0 0
3729 720 4700 S Material & Build Quality TPU and polycarbonate, clear sturdy design, glossy finish with anti-slip texture, antibacterial and anti-yellow coating 0 0
3730 720 4700 S Material & Build Quality TPU and polycarbonate, clear sturdy design, glossy finish with anti-slip texture, antibacterial and anti-yellow coating 0 0
3731 720 0.00 4702 S Material & Build Quality Silicone material, soft-touch matte finish, antibacterial coating 0 0
3732 720 4702 S Material & Build Quality Silicone material, soft-touch matte finish, antibacterial coating 0 0
3733 720 4702 S Material & Build Quality Silicone material, soft-touch matte finish, antibacterial coating 0 0
3734 720 4704 S Material & Build Quality Silicone material, soft-touch matte texture, snug fit design, dust-resistant 0 0
3798 720 4741 S Material & Build Quality High-quality duotone silicone, soft-touch matte finish, provides full coverage and grip-enhancing texture 0 0
3811 720 4753 S Material & Build Quality Premium silicone material, soft-touch matte finish, compact and lightweight design 0 0
3850 720 0.00 4796 S Material & Build Quality TPU and polycarbonate, ultra-clear sturdy design, glossy finish with anti-slip edges, anti-yellow coating 0 0
3851 720 4796 S Material & Build Quality TPU and polycarbonate, ultra-clear sturdy design, glossy finish with anti-slip edges, anti-yellow coating 0 0
3852 720 4796 S Material & Build Quality TPU and polycarbonate, ultra-clear sturdy design, glossy finish with anti-slip edges, anti-yellow coating 0 0
3864 720 0.00 4814 S Material & Build Quality TPU and polycarbonate, transparent durable design, glossy finish with anti-slip grip, anti-yellow and antibacterial coating 0 0
3865 720 0.00 4815 S Material & Build Quality TPU and polycarbonate, transparent sturdy design, glossy finish with anti-slip texture, antibacterial and anti-yellow coating 0 0
3940 720 0.00 4909 S Material & Build Quality TPU and polycarbonate, slim and lightweight design, clear glossy finish with fingerprint-resistant coating, anti-slip grip 0 0
3941 720 4909 S Material & Build Quality TPU and polycarbonate, slim and lightweight design, clear glossy finish with fingerprint-resistant coating, anti-slip grip 0 0
3942 720 4909 S Material & Build Quality TPU and polycarbonate, slim and lightweight design, clear glossy finish with fingerprint-resistant coating, anti-slip grip 0 0
3943 720 4909 S Material & Build Quality TPU and polycarbonate, slim and lightweight design, clear glossy finish with fingerprint-resistant coating, anti-slip grip 0 0
3869 717 3977 S Privacy Option No 0 0
3869 716 3975 S Protection Type Tempered Glass 0 0