Query time 0.00051
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "14.48"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "3.00"
},
"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.20",
"prefix_cost": "0.00",
"data_read_per_join": "16"
},
"used_columns": [
"storefront_id",
"promotion_id"
]
}
},
{
"table": {
"table_name": "q_promotions",
"access_type": "ALL",
"rows_examined_per_scan": 30,
"rows_produced_per_join": 3,
"filtered": "10.00",
"cost_info": {
"read_cost": "10.28",
"eval_cost": "0.60",
"prefix_cost": "10.88",
"data_read_per_join": "216"
},
"used_columns": [
"promotion_id",
"company_id",
"conditions",
"bonuses",
"to_date",
"from_date",
"priority",
"stop",
"zone",
"conditions_hash",
"status",
"number_of_usages",
"users_conditions_hash"
],
"attached_condition": "(if(`portal`.`q_promotions`.`from_date`,(`portal`.`q_promotions`.`from_date` <= 1727537824),1) and if(`portal`.`q_promotions`.`to_date`,(`portal`.`q_promotions`.`to_date` >= 1727537824),1) and (`portal`.`q_promotions`.`status` in ('A','H')) and (`portal`.`q_promotions`.`zone` = 'catalog'))"
}
},
{
"table": {
"table_name": "q_promotion_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"promotion_id",
"lang_code"
],
"key_length": "9",
"ref": [
"portal.q_promotions.promotion_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.60",
"prefix_cost": "11.48",
"data_read_per_join": "2K"
},
"used_columns": [
"promotion_id",
"name",
"short_description",
"detailed_description",
"lang_code"
]
}
}
]
}
}
}
Result
promotion_id |
company_id |
conditions |
bonuses |
to_date |
from_date |
priority |
stop |
zone |
conditions_hash |
status |
number_of_usages |
users_conditions_hash |
name |
detailed_description |
short_description |
37 |
0 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:1;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";s:5:"50522";}}} |
a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:8:"by_fixed";s:14:"discount_value";s:2:"20";}} |
0 |
0 |
0 |
Y |
catalog |
products=50522 |
A |
27 |
|
Thermometer |
|
|