SELECT 
  pf.feature_id, 
  pf.company_id, 
  pf.feature_type, 
  pf.parent_id, 
  pf.display_on_product, 
  pf.display_on_catalog, 
  pf.display_on_header, 
  cscart_product_features_descriptions.description, 
  cscart_product_features_descriptions.internal_name, 
  cscart_product_features_descriptions.lang_code, 
  cscart_product_features_descriptions.prefix, 
  cscart_product_features_descriptions.suffix, 
  pf.categories_path, 
  cscart_product_features_descriptions.full_description, 
  pf.status, 
  pf.comparison, 
  pf.position, 
  pf.purpose, 
  pf.feature_style, 
  pf.filter_style, 
  pf.feature_code, 
  pf.timestamp, 
  pf.updated_timestamp 
FROM 
  cscart_product_features AS pf 
  LEFT JOIN cscart_product_features_descriptions ON cscart_product_features_descriptions.feature_id = pf.feature_id 
  AND cscart_product_features_descriptions.lang_code = 'en' 
WHERE 
  pf.feature_type = 'G' 
  AND (
    pf.feature_id IN ('') 
    OR pf.feature_id NOT IN (
      SELECT 
        parent_id 
      FROM 
        cscart_product_features
    )
  ) 
ORDER BY 
  pf.position, 
  cscart_product_features_descriptions.description

Query time 0.00176

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.33570016,
    "filesort": {
      "sort_key": "pf.position, cscart_product_features_descriptions.description",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "pf",
              "access_type": "ALL",
              "possible_keys": ["PRIMARY"],
              "loops": 1,
              "rows": 304,
              "cost": 0.0629712,
              "filtered": 100,
              "attached_condition": "pf.feature_type = 'G' and (pf.feature_id = '' or !<in_optimizer>(pf.feature_id,pf.feature_id in (subquery#2)))"
            }
          },
          {
            "table": {
              "table_name": "cscart_product_features_descriptions",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "9",
              "used_key_parts": ["feature_id", "lang_code"],
              "ref": ["u508912950_dev_2025.pf.feature_id", "const"],
              "loops": 304,
              "rows": 1,
              "cost": 0.27272896,
              "filtered": 100,
              "attached_condition": "trigcond(cscart_product_features_descriptions.lang_code = 'en')"
            }
          }
        ],
        "subqueries": [
          {
            "materialization": {
              "query_block": {
                "select_id": 2,
                "cost": 0.0629712,
                "nested_loop": [
                  {
                    "table": {
                      "table_name": "cscart_product_features",
                      "access_type": "ALL",
                      "loops": 1,
                      "rows": 304,
                      "cost": 0.0629712,
                      "filtered": 100
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}

Result

feature_id company_id feature_type parent_id display_on_product display_on_catalog display_on_header description internal_name lang_code prefix suffix categories_path full_description status comparison position purpose feature_style filter_style feature_code timestamp updated_timestamp
614 945 G 0 N N N Aden Cos Shades Aden Cos Shades en 357,574,575,576,577,578 A N 0 1742219920 1742219920
14 0 G 0 Y Y N Electronics Electronics en D N 0 0 1714298849
20 0 G 0 Y Y N Main features Main features en H N 10 0 1738253649
600 942 G 0 N N N Size (g) Size (g) en 313,913,1630,315 A N 20 1740415049 1742216548
24 0 G 0 Y Y N Specifications Specifications en H N 20 0 1714298849
33 0 G 0 Y Y N Multimedia Multimedia en H N 30 0 1738253686
30 0 G 0 Y Y N Interfaces Interfaces en H N 40 0 1714298849