Query time 0.00124
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "21.93"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "11.00"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_promotions",
"access_type": "ALL",
"rows_examined_per_scan": 55,
"rows_produced_per_join": 5,
"filtered": "10.00",
"cost_info": {
"read_cost": "6.86",
"eval_cost": "0.55",
"prefix_cost": "7.41",
"data_read_per_join": "440"
},
"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(`dev_yourmart_co_bw`.`cscart_promotions`.`from_date`,(`dev_yourmart_co_bw`.`cscart_promotions`.`from_date` <= 1749229335),1)) and (0 <> if(`dev_yourmart_co_bw`.`cscart_promotions`.`to_date`,(`dev_yourmart_co_bw`.`cscart_promotions`.`to_date` >= 1749229335),1)) and (`dev_yourmart_co_bw`.`cscart_promotions`.`status` in ('A','H')) and (`dev_yourmart_co_bw`.`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": [
"dev_yourmart_co_bw.cscart_promotions.promotion_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.38",
"eval_cost": "0.55",
"prefix_cost": "9.33",
"data_read_per_join": "4K"
},
"used_columns": [
"promotion_id",
"name",
"short_description",
"detailed_description",
"lang_code"
]
}
},
{
"table": {
"table_name": "storefronts_promotions",
"access_type": "index",
"key": "PRIMARY",
"used_key_parts": [
"storefront_id",
"promotion_id"
],
"key_length": "8",
"rows_examined_per_scan": 2,
"rows_produced_per_join": 11,
"filtered": "100.00",
"using_index": true,
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "0.50",
"eval_cost": "1.10",
"prefix_cost": "10.93",
"data_read_per_join": "176"
},
"used_columns": [
"storefront_id",
"promotion_id"
],
"attached_condition": "(<if>(found_match(storefronts_promotions), ((`dev_yourmart_co_bw`.`storefronts_promotions`.`storefront_id` = 1) or (`dev_yourmart_co_bw`.`storefronts_promotions`.`storefront_id` is null)), true) and <if>(is_not_null_compl(storefronts_promotions), (`dev_yourmart_co_bw`.`storefronts_promotions`.`promotion_id` = `dev_yourmart_co_bw`.`cscart_promotions`.`promotion_id`), true))"
}
}
]
}
}
}