Query time 0.00198
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "43.14"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "27.36"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_promotions",
"access_type": "ALL",
"rows_examined_per_scan": 18,
"rows_produced_per_join": 9,
"filtered": "50.00",
"cost_info": {
"read_cost": "2.10",
"eval_cost": "0.90",
"prefix_cost": "3.00",
"data_read_per_join": "720"
},
"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"
],
"attached_condition": "(`test_uchur_k`.`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": [
"test_uchur_k.cscart_promotions.promotion_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.25",
"eval_cost": "0.90",
"prefix_cost": "6.15",
"data_read_per_join": "7K"
},
"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": 16,
"rows_produced_per_join": 27,
"filtered": "19.00",
"using_index": true,
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "1.90",
"eval_cost": "2.74",
"prefix_cost": "10.79",
"data_read_per_join": "437"
},
"used_columns": [
"storefront_id",
"promotion_id"
],
"attached_condition": "(<if>(found_match(storefronts_promotions), ((`test_uchur_k`.`storefronts_promotions`.`storefront_id` = 1) or (`test_uchur_k`.`storefronts_promotions`.`storefront_id` is null)), true) and <if>(is_not_null_compl(storefronts_promotions), (`test_uchur_k`.`storefronts_promotions`.`promotion_id` = `test_uchur_k`.`cscart_promotions`.`promotion_id`), true))"
}
},
{
"table": {
"table_name": "cscart_ab__dotd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"promotion_id"
],
"key_length": "3",
"ref": [
"test_uchur_k.cscart_promotions.promotion_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 27,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.25",
"eval_cost": "2.74",
"prefix_cost": "15.78",
"data_read_per_join": "1K"
},
"used_columns": [
"promotion_id",
"group_by_category",
"use_products_filter",
"hide_products_block",
"show_label_in_products_lists",
"show_in_products_lists",
"show_counter_on_promotion_page",
"show_counter_on_product_page",
"use_schedule",
"ab__dotd_schedule"
]
}
}
]
}
}
}
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 |
name |
detailed_description |
short_description |
group_by_category |
use_products_filter |
hide_products_block |
show_label_in_products_lists |
show_in_products_lists |
show_counter_on_promotion_page |
show_counter_on_product_page |
use_schedule |
ab__dotd_schedule |
| 28 |
1 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:3:{i:1;a:5:{s:17:"condition_element";s:1:"2";s:8:"operator";s:2:"eq";s:9:"condition";s:7:"feature";s:5:"value";s:1:"5";s:10:"value_name";s:19:"Без скидки";}i:2;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:1:"8";}i:3;a:5:{s:17:"condition_element";s:3:"218";s:8:"operator";s:3:"neq";s:9:"condition";s:7:"feature";s:5:"value";s:4:"1617";s:10:"value_name";s:21:"Неликвид -15%";}}} |
a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";s:1:"7";}} |
0 |
0 |
0 |
N |
N |
catalog |
feature=5;usergroup=8;feature=1617 |
H |
0 |
|
Дисконтная Gold Sale 7% |
|
|
N |
Y |
N |
Y |
Y |
Y |
Y |
N |
a:3:{i:2025;a:12:{i:1;s:2:"[]";i:2;s:2:"[]";i:3;s:2:"[]";i:4;s:2:"[]";i:5;s:2:"[]";i:6;s:2:"[]";i:7;s:2:"[]";i:8;s:2:"[]";i:9;s:2:"[]";i:10;s:2:"[]";i:11;s:2:"[]";i:12;s:2:"[]";}i:2026;a:12:{i:1;s:2:"[]";i:2;s:2:"[]";i:3;s:2:"[]";i:4;s:2:"[]";i:5;s:2:"[]";i:6;s:2:"[]";i:7;s:2:"[]";i:8;s:2:"[]";i:9;s:2:"[]";i:10;s:2:"[]";i:11;s:2:"[]";i:12;s:2:"[]";}i:2027;a:12:{i:1;s:2:"[]";i:2;s:2:"[]";i:3;s:2:"[]";i:4;s:2:"[]";i:5;s:2:"[]";i:6;s:2:"[]";i:7;s:2:"[]";i:8;s:2:"[]";i:9;s:2:"[]";i:10;s:2:"[]";i:11;s:2:"[]";i:12;s:2:"[]";}} |
| 29 |
1 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:3:{i:1;a:5:{s:17:"condition_element";s:1:"2";s:8:"operator";s:2:"eq";s:9:"condition";s:7:"feature";s:5:"value";s:1:"5";s:10:"value_name";s:0:"";}i:2;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:2:"10";}i:3;a:5:{s:17:"condition_element";s:3:"218";s:8:"operator";s:3:"neq";s:9:"condition";s:7:"feature";s:5:"value";s:4:"1617";s:10:"value_name";s:0:"";}}} |
a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";s:2:"10";}} |
0 |
0 |
0 |
N |
N |
catalog |
feature=5;usergroup=10;feature=1617 |
H |
0 |
|
Дисконтная Platinum Sale 10% |
|
|
N |
Y |
N |
Y |
Y |
Y |
Y |
N |
|
| 27 |
1 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:3:{i:1;a:5:{s:17:"condition_element";s:1:"2";s:8:"operator";s:2:"eq";s:9:"condition";s:7:"feature";s:5:"value";s:1:"5";s:10:"value_name";s:0:"";}i:2;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:1:"7";}i:3;a:5:{s:17:"condition_element";s:3:"218";s:8:"operator";s:3:"neq";s:9:"condition";s:7:"feature";s:5:"value";s:4:"1617";s:10:"value_name";s:0:"";}}} |
a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";s:1:"5";}} |
0 |
0 |
0 |
N |
N |
catalog |
feature=5;usergroup=7;feature=1617 |
H |
0 |
|
Дисконтная Silver Sale 5% |
|
|
N |
Y |
N |
Y |
Y |
Y |
Y |
N |
|
| 30 |
1 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:1;a:5:{s:17:"condition_element";s:3:"218";s:8:"operator";s:2:"eq";s:9:"condition";s:7:"feature";s:5:"value";s:4:"1617";s:10:"value_name";s:0:"";}}} |
a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";s:2:"15";}} |
0 |
0 |
0 |
N |
Y |
catalog |
feature=1617 |
H |
0 |
|
Распродажа -15% |
|
|
N |
Y |
N |
Y |
Y |
Y |
Y |
N |
|