Query time 0.00320
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "530.44"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "159.00"
},
"nested_loop": [
{
"table": {
"table_name": "promotions",
"access_type": "ALL",
"rows_examined_per_scan": 1590,
"rows_produced_per_join": 159,
"filtered": "10.00",
"cost_info": {
"read_cost": "171.03",
"eval_cost": "15.90",
"prefix_cost": "186.93",
"data_read_per_join": "12K"
},
"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(`goimagine`.`promotions`.`from_date`,(`goimagine`.`promotions`.`from_date` <= 1755727737),1)) and (0 <> if(`goimagine`.`promotions`.`to_date`,(`goimagine`.`promotions`.`to_date` >= 1755727737),1)) and (`goimagine`.`promotions`.`status` in ('A','H')) and (`goimagine`.`promotions`.`zone` = 'catalog'))"
}
},
{
"table": {
"table_name": "promotion_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"promotion_id",
"lang_code"
],
"key_length": "9",
"ref": [
"goimagine.promotions.promotion_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 159,
"filtered": "100.00",
"cost_info": {
"read_cost": "150.48",
"eval_cost": "15.90",
"prefix_cost": "353.32",
"data_read_per_join": "124K"
},
"used_columns": [
"promotion_id",
"name",
"short_description",
"detailed_description",
"lang_code"
]
}
},
{
"table": {
"table_name": "storefronts_promotions",
"access_type": "index",
"key": "idx_storefront_id",
"used_key_parts": [
"storefront_id"
],
"key_length": "4",
"rows_examined_per_scan": 1,
"rows_produced_per_join": 159,
"filtered": "100.00",
"using_index": true,
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "2.22",
"eval_cost": "15.90",
"prefix_cost": "371.44",
"data_read_per_join": "2K"
},
"used_columns": [
"storefront_id",
"promotion_id"
],
"attached_condition": "(<if>(found_match(storefronts_promotions), ((`goimagine`.`storefronts_promotions`.`storefront_id` = 1) or (`goimagine`.`storefronts_promotions`.`storefront_id` is null)), true) and <if>(is_not_null_compl(storefronts_promotions), (`goimagine`.`storefronts_promotions`.`promotion_id` = `goimagine`.`promotions`.`promotion_id`), true))"
}
}
]
}
}
}
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 |
2491 |
139 |
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";s:3:"781";}i:2;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:14:"ss_prom_vendor";s:5:"value";s:3:"139";}}} |
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:"40";}} |
0 |
0 |
0 |
N |
catalog |
products=781;ss_prom_vendor=139 |
A |
0 |
|
N |
Testing SD-450 from CS-Cart |
<p>Testing SD-450 from CS-Cart</p> |
<p>Testing SD-450 from CS-Cart</p> |
2532 |
2 |
a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:2;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:14:"ss_prom_vendor";s:5:"value";s:1:"2";}}} |
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:"20";}} |
1759204799 |
1725076800 |
0 |
N |
catalog |
ss_prom_vendor=2 |
A |
6 |
|
N |
20% Off Sale |
|
|