Query time 0.00109
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "17.58"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "1.94"
},
"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": 97,
"rows_produced_per_join": 1,
"filtered": "2.00",
"cost_info": {
"read_cost": "15.26",
"eval_cost": "0.19",
"prefix_cost": "15.45",
"data_read_per_join": "170"
},
"used_columns": [
"promotion_id",
"company_id",
"conditions",
"bonuses",
"to_date",
"from_date",
"priority",
"stop",
"stop_other_rules",
"zone",
"conditions_hash",
"status",
"number_of_usages",
"users_conditions_hash",
"is_unlimited",
"limitations_use",
"is_combinable"
],
"attached_condition": "((0 <> if(`chocoramo`.`cscart_promotions`.`from_date`,(`chocoramo`.`cscart_promotions`.`from_date` <= 1731628306),1)) and (0 <> if(`chocoramo`.`cscart_promotions`.`to_date`,(`chocoramo`.`cscart_promotions`.`to_date` >= 1731628306),1)) and (`chocoramo`.`cscart_promotions`.`status` in ('A','H')) and (`chocoramo`.`cscart_promotions`.`zone` = 'cart') and (`chocoramo`.`cscart_promotions`.`company_id` in (0,380)))"
}
},
{
"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": [
"chocoramo.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.19",
"prefix_cost": "15.64",
"data_read_per_join": "1K"
},
"used_columns": [
"promotion_id",
"name",
"short_description",
"detailed_description",
"lang_code"
]
}
}
]
}
}
}
Result
promotion_id |
company_id |
conditions |
bonuses |
to_date |
from_date |
priority |
stop |
stop_other_rules |
zone |
conditions_hash |
status |
number_of_usages |
users_conditions_hash |
is_unlimited |
limitations_use |
is_combinable |
name |
detailed_description |
short_description |
11 |
0 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:2:{i:1;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";a:1:{i:0;a:2:{s:10:"product_id";i:5391;s:6:"amount";i:1;}}}i:2;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";a:1:{i:1;a:2:{s:10:"product_id";i:5441;s:6:"amount";i:1;}}}}} |
a:1:{i:0;a:3:{s:5:"bonus";s:14:"order_discount";s:14:"discount_bonus";s:8:"by_fixed";s:14:"discount_value";d:3.3000000000000043;}} |
0 |
0 |
0 |
N |
N |
cart |
products=0;products=1 |
A |
0 |
|
1 |
0 |
N |
new Bundle |
|
|