Query time 0.00906
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.054794075,
"filesort": {
"sort_key": "tmall_ab__category_banner_images_and_descr.category_banner",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "tmall_ab__category_banners",
"access_type": "ref",
"possible_keys": ["PRIMARY", "status"],
"key": "status",
"key_length": "3",
"used_key_parts": ["status"],
"ref": ["const"],
"loops": 1,
"rows": 2,
"cost": 0.004452,
"filtered": 100,
"index_condition": "tmall_ab__category_banners.`status` = 'A'",
"attached_condition": "if(tmall_ab__category_banners.from_date,tmall_ab__category_banners.from_date <= 1765545207,1) and if(tmall_ab__category_banners.to_date,tmall_ab__category_banners.to_date >= 1765545207,1)"
}
},
{
"table": {
"table_name": "tmall_ab__category_banner_images_and_descr",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "banner"],
"key": "banner",
"key_length": "9",
"used_key_parts": ["category_banner_id", "lang_code"],
"ref": [
"tmall.tmall_ab__category_banners.category_banner_id",
"const"
],
"loops": 2,
"rows": 1,
"cost": 0.00508072,
"filtered": 100,
"index_condition": "tmall_ab__category_banner_images_and_descr.category_banner_image_id is not null and tmall_ab__category_banner_images_and_descr.lang_code = 'en'"
}
},
{
"table": {
"table_name": "ab__category_banner_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_banner_id"],
"ref": ["tmall.tmall_ab__category_banners.category_banner_id"],
"loops": 2,
"rows": 1,
"cost": 0.00274834,
"filtered": 100,
"attached_condition": "trigcond(ab__category_banner_categories.category_id = 189 or tmall_ab__category_banners.include_subcategories = 'Y')"
}
},
{
"table": {
"table_name": "ab__category_banner_categories1",
"access_type": "ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_banner_id"],
"ref": ["tmall.tmall_ab__category_banners.category_banner_id"],
"loops": 2,
"rows": 1,
"cost": 0.00274834,
"filtered": 100,
"attached_condition": "trigcond(ab__category_banner_categories.category_id = 189 or ab__category_banner_categories1.category_id in (166,175,189) and tmall_ab__category_banners.include_subcategories = 'Y')"
}
},
{
"table": {
"table_name": "il",
"access_type": "ref",
"possible_keys": ["PRIMARY", "object_id"],
"key": "object_id",
"key_length": "81",
"used_key_parts": ["object_id", "object_type", "type"],
"ref": [
"tmall.tmall_ab__category_banner_images_and_descr.category_banner_image_id",
"const",
"const"
],
"loops": 2,
"rows": 10,
"cost": 0.02629259,
"filtered": 100,
"index_condition": "il.object_type = 'category_banner' and il.object_id = tmall_ab__category_banner_images_and_descr.category_banner_image_id and il.`type` = 'M'",
"attached_condition": "il.pair_id is not null"
}
}
]
}
}
}
}
Result
| category_banner_id |
status |
target_blank |
nofollow |
repeat |
position |
include_subcategories |
from_date |
to_date |
category_banner |
url |
category_banner_image_id |
| 1 |
A |
Y |
N |
a:7:{i:1;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:2;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:3;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:4;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:5;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:6;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:7;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}} |
1-3 |
Y |
0 |
0 |
AB: Category banner 1 |
|
1 |
| 2 |
A |
Y |
N |
a:7:{i:1;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:2;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:3;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:4;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:5;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:6;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}i:7;a:3:{s:6:"active";s:1:"Y";s:9:"time_from";s:0:"";s:7:"time_to";s:0:"";}} |
4-6 |
Y |
0 |
0 |
AB: Category banner 2 |
|
2 |