Query time 0.00034
    
    
            JSON explain
        {
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4.50"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "1.20"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "storefronts_promotions",
            "access_type": "system",
            "rows_examined_per_scan": 0,
            "rows_produced_per_join": 1,
            "filtered": "0.00",
            "const_row_not_found": true,
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.10",
              "prefix_cost": "0.00",
              "data_read_per_join": "16"
            },
            "used_columns": [
              "storefront_id",
              "promotion_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_promotions",
            "access_type": "ALL",
            "rows_examined_per_scan": 12,
            "rows_produced_per_join": 1,
            "filtered": "10.00",
            "cost_info": {
              "read_cost": "3.06",
              "eval_cost": "0.12",
              "prefix_cost": "3.18",
              "data_read_per_join": "96"
            },
            "used_columns": [
              "promotion_id",
              "company_id",
              "conditions",
              "bonuses",
              "to_date",
              "from_date",
              "priority",
              "stop",
              "zone",
              "conditions_hash",
              "status",
              "number_of_usages",
              "users_conditions_hash",
              "stop_other_rules"
            ],
            "attached_condition": "((0 <> if(`betaatif_store`.`cscart_promotions`.`from_date`,(`betaatif_store`.`cscart_promotions`.`from_date` <= 1761147033),1)) and (0 <> if(`betaatif_store`.`cscart_promotions`.`to_date`,(`betaatif_store`.`cscart_promotions`.`to_date` >= 1761147033),1)) and (`betaatif_store`.`cscart_promotions`.`status` in ('A','H')) and (`betaatif_store`.`cscart_promotions`.`zone` = 'catalog'))"
          }
        },
        {
          "table": {
            "table_name": "cscart_promotion_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "promotion_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "betaatif_store.cscart_promotions.promotion_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.12",
              "prefix_cost": "3.30",
              "data_read_per_join": "960"
            },
            "used_columns": [
              "promotion_id",
              "name",
              "short_description",
              "detailed_description",
              "lang_code"
            ]
          }
        }
      ]
    }
  }
}