Query time 0.01070
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.00652225,
"nested_loop": [
{
"table": {
"table_name": "links",
"access_type": "ref",
"possible_keys": ["PRIMARY", "bundle_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["const"],
"loops": 1,
"rows": 1,
"cost": 0.002024411,
"filtered": 100,
"attached_condition": "links.product_id <=> 12 and links.show_on_product_page = 'Y'"
}
},
{
"table": {
"table_name": "bundles",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["bundle_id"],
"ref": ["tmall.links.bundle_id"],
"loops": 1,
"rows": 1,
"cost": 0.001933826,
"filtered": 100,
"attached_condition": "bundles.`status` = 'A' and if(bundles.date_from,bundles.date_from <= 1765518721,1) and if(bundles.date_to,bundles.date_to >= 1765518721,1)"
}
},
{
"table": {
"table_name": "descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "10",
"used_key_parts": ["bundle_id", "lang_code"],
"ref": ["tmall.links.bundle_id", "const"],
"loops": 1,
"rows": 1,
"cost": 0.001933826,
"filtered": 100,
"attached_condition": "trigcond(descriptions.lang_code = 'en')"
}
}
]
}
}
Result
| bundle_id |
company_id |
products |
date_from |
date_to |
display_in_promotions |
status |
linked_promotion_id |
name |
storefront_name |
description |
lang_code |
product_id |
amount |
show_on_product_page |
all_variants |
| 1 |
1 |
a:1:{i:0;a:6:{s:10:"product_id";i:12;s:6:"amount";i:3;s:13:"modifier_type";s:13:"by_percentage";s:8:"modifier";d:33.33;s:20:"show_on_product_page";s:1:"Y";s:3:"aoc";s:1:"Y";}} |
0 |
0 |
Y |
A |
25 |
Sports pants bundle |
Sports pants bundle |
Get 3 pairs of pants at the price of 2 |
en |
12 |
3 |
Y |
N |