SELECT 
  * 
FROM 
  cscart_bm_locations as l 
  LEFT JOIN cscart_bm_locations_descriptions as d ON d.location_id = l.location_id 
  AND d.lang_code = 'en' 
WHERE 
  l.layout_id = 10 
  AND l.dispatch IN ('categories.view') 
  AND (
    FIND_IN_SET(2690, l.object_ids) 
    OR l.object_ids = ''
  ) 
ORDER BY 
  l.object_ids desc 
LIMIT 
  1

Query time 0.00131

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "55.58"
    },
    "ordering_operation": {
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "l",
            "access_type": "ALL",
            "rows_examined_per_scan": 507,
            "rows_produced_per_join": 5,
            "filtered": "1.00",
            "cost_info": {
              "read_cost": "53.30",
              "eval_cost": "0.51",
              "prefix_cost": "53.80",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "location_id",
              "dispatch",
              "is_default",
              "layout_id",
              "object_ids",
              "custom_html",
              "position"
            ],
            "attached_condition": "((`cscart_db`.`l`.`layout_id` = 10) and (`cscart_db`.`l`.`dispatch` = 'categories.view') and ((0 <> find_in_set(2690,`cscart_db`.`l`.`object_ids`)) or (`cscart_db`.`l`.`object_ids` = '')))"
          }
        },
        {
          "table": {
            "table_name": "d",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "location_id",
              "lang_code"
            ],
            "key_length": "10",
            "ref": [
              "cscart_db.l.location_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 5,
            "filtered": "100.00",
            "index_condition": "<if>(is_not_null_compl(d), (`cscart_db`.`d`.`location_id` = `cscart_db`.`l`.`location_id`), true)",
            "cost_info": {
              "read_cost": "1.27",
              "eval_cost": "0.51",
              "prefix_cost": "55.58",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "location_id",
              "lang_code",
              "name",
              "title",
              "meta_description",
              "meta_keywords"
            ]
          }
        }
      ]
    }
  }
}

Result

location_id dispatch is_default layout_id object_ids custom_html position lang_code name title meta_description meta_keywords
364 categories.view 0 10 <meta property="og:image" property="og:image" content="https://kindlife.in/images/ui_icon/kindlifeLogo.jpg" /> <link type="text/css" rel="stylesheet" href="https://kindlife.in/design/themes/new_2bk/css/addons/my_changes/common.css?a=3"> <link type="text/css" rel="stylesheet" href="/design/themes/new_2bk/css/addons/my_changes/category.css?k=4"> 40 en Categories Well-Being made easy | Clean Beauty, Healthy Snacks, Wellness brands Kindlife.in brings the latest K-beauty, J-beauty, and global trends to Gen Z in India. Join a vibrant community, explore cult-favorite skincare, and get AI-powered recommendations. Find your kind. Korean beauty products online india, japanese beauty products india, k-beauty india, skincare online india, buy k-pop merch india, organic makeup india, clean beauty products online, wellness products india, supplements online india, natural and organic products, gen z beauty trends, conscious consumers india, sustainable wellness india, ai powered skincare recommendations