SELECT 
  storefronts.* 
FROM 
  cscart_storefronts AS storefronts 
WHERE 
  1 = 1 
  AND (
    storefronts.url = 'demov2026.kcoffee.vn' 
    OR storefronts.url = 'www.demov2026.kcoffee.vn' 
    OR storefronts.url LIKE 'www_.demov2026.kcoffee.vn' 
    OR storefronts.url LIKE 'demov2026.kcoffee.vn/%' 
    OR storefronts.url LIKE 'www.demov2026.kcoffee.vn/%' 
    OR storefronts.url LIKE 'www_.demov2026.kcoffee.vn/%'
  ) 
GROUP BY 
  storefronts.storefront_id 
ORDER BY 
  storefronts.url = 'demov2026.kcoffee.vn' DESC, 
  storefronts.url = 'www.demov2026.kcoffee.vn' DESC, 
  storefronts.url LIKE 'www_.demov2026.kcoffee.vn' DESC, 
  storefronts.url LIKE 'demov2026.kcoffee.vn/%' DESC, 
  storefronts.url LIKE 'www.demov2026.kcoffee.vn/%' DESC, 
  storefronts.url LIKE 'www_.demov2026.kcoffee.vn/%' desc

Query time 0.00020

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "storefronts",
          "access_type": "system",
          "rows": 1,
          "filtered": 100
        }
      }
    ]
  }
}

Result

storefront_id url redirect_customer is_default status access_key name theme_name is_accessible_for_authorized_customers_only
1 demov2026.kcoffee.vn N Y N CS-Cart abt__unitheme2 N