Query time 0.00104
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.27"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "2.09"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_promotions",
"access_type": "ALL",
"rows_examined_per_scan": 10,
"rows_produced_per_join": 1,
"filtered": "10.00",
"cost_info": {
"read_cost": "1.65",
"eval_cost": "0.10",
"prefix_cost": "1.75",
"data_read_per_join": "80"
},
"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": "(`zdrowy_db`.`cscart_promotions`.`status` = 'A')"
}
},
{
"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": [
"zdrowy_db.cscart_promotions.promotion_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "2.10",
"data_read_per_join": "800"
},
"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": 11,
"rows_produced_per_join": 2,
"filtered": "19.00",
"using_index": true,
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "1.41",
"eval_cost": "0.21",
"prefix_cost": "3.72",
"data_read_per_join": "33"
},
"used_columns": [
"storefront_id",
"promotion_id"
],
"attached_condition": "(<if>(found_match(storefronts_promotions), ((`zdrowy_db`.`storefronts_promotions`.`storefront_id` = 1) or (`zdrowy_db`.`storefronts_promotions`.`storefront_id` is null)), true) and <if>(is_not_null_compl(storefronts_promotions), (`zdrowy_db`.`storefronts_promotions`.`promotion_id` = `zdrowy_db`.`cscart_promotions`.`promotion_id`), true))"
}
},
{
"table": {
"table_name": "cscart_promotion_images",
"access_type": "eq_ref",
"possible_keys": [
"promo"
],
"key": "promo",
"used_key_parts": [
"promotion_id",
"lang_code"
],
"key_length": "10",
"ref": [
"zdrowy_db.cscart_promotions.promotion_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"index_condition": "<if>(is_not_null_compl(cscart_promotion_images), (`zdrowy_db`.`cscart_promotion_images`.`promotion_id` = `zdrowy_db`.`cscart_promotions`.`promotion_id`), true)",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.21",
"prefix_cost": "4.18",
"data_read_per_join": "33"
},
"used_columns": [
"promotion_image_id",
"promotion_id",
"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 |
stop_other_rules |
name |
detailed_description |
short_description |
promotion_image_id |
| 24 |
1 |
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:3:"gte";s:9:"condition";s:8:"subtotal";s:5:"value";d:3000;}}} |
a:4:{i:1;a:2:{s:5:"bonus";s:13:"free_shipping";s:5:"value";s:2:"24";}i:2;a:2:{s:5:"bonus";s:13:"free_shipping";s:5:"value";s:1:"6";}i:5;a:2:{s:5:"bonus";s:13:"free_shipping";s:5:"value";s:2:"11";}i:6;a:2:{s:5:"bonus";s:13:"free_shipping";s:5:"value";s:2:"19";}} |
1774990799 |
1767387600 |
0 |
N |
cart |
subtotal=3000 |
A |
531 |
|
N |
Бесплатная доставка на заказ от 3000 руб. Москва и Московская область |
<p>Наш интернет - магазин предлагает лучшие условия доставки для заказов более 3000 руб. Воспользуйтесь этим предложением прямо сейчас и сэкономите на доставке, мы привезем товар за свой счет. Акция действует для региона Москва и Московская область </p> |
<p>Получите эксклюзивные условия доставки при заказе свыше 3000 руб.</p> |
12 |