Query time 0.00066
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "11.50"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "3.00"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_banners",
"access_type": "ref",
"possible_keys": [
"status"
],
"key": "status",
"used_key_parts": [
"status"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 30,
"rows_produced_per_join": 3,
"filtered": "10.00",
"cost_info": {
"read_cost": "1.15",
"eval_cost": "0.30",
"prefix_cost": "4.15",
"data_read_per_join": "27K"
},
"used_columns": [
"banner_id",
"status",
"type",
"target",
"timestamp",
"abt__ut2_usergroup_ids",
"abt__ut2_use_avail_period",
"abt__ut2_avail_from",
"abt__ut2_avail_till",
"category_id",
"tabs",
"mini"
],
"attached_condition": "((`dev2`.`cscart_banners`.`category_id` = 712) and (if((not((`dev2`.`cscart_banners`.`type` like 'abt__ut2'))),'available',if(((`dev2`.`cscart_banners`.`type` like 'abt__ut2') and ((`dev2`.`cscart_banners`.`abt__ut2_use_avail_period` = 'N') or ((`dev2`.`cscart_banners`.`abt__ut2_use_avail_period` = 'Y') and ((`dev2`.`cscart_banners`.`abt__ut2_avail_from` = 0) or (`dev2`.`cscart_banners`.`abt__ut2_avail_from` <= 1742294870)) and ((`dev2`.`cscart_banners`.`abt__ut2_avail_till` = 0) or (`dev2`.`cscart_banners`.`abt__ut2_avail_till` >= 1742294870))))),'available','not available')) = 'available') and ((`dev2`.`cscart_banners`.`abt__ut2_usergroup_ids` = '') or (0 <> find_in_set(0,`dev2`.`cscart_banners`.`abt__ut2_usergroup_ids`)) or (0 <> find_in_set(1,`dev2`.`cscart_banners`.`abt__ut2_usergroup_ids`))))"
}
},
{
"table": {
"table_name": "cscart_banner_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"banner_id",
"lang_code"
],
"key_length": "9",
"ref": [
"dev2.cscart_banners.banner_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.75",
"eval_cost": "0.30",
"prefix_cost": "5.20",
"data_read_per_join": "15K"
},
"used_columns": [
"banner_id",
"banner",
"url",
"description",
"lang_code"
]
}
},
{
"table": {
"table_name": "cscart_banner_images",
"access_type": "eq_ref",
"possible_keys": [
"banner"
],
"key": "banner",
"used_key_parts": [
"banner_id",
"lang_code"
],
"key_length": "9",
"ref": [
"dev2.cscart_banners.banner_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.00",
"eval_cost": "0.30",
"prefix_cost": "8.50",
"data_read_per_join": "48"
},
"used_columns": [
"banner_image_id",
"banner_id",
"lang_code"
],
"attached_condition": "<if>(found_match(cscart_banner_images), ((`dev2`.`cscart_banners`.`type` <> 'G') or (`dev2`.`cscart_banner_images`.`banner_image_id` is not null)), true)"
}
}
]
}
}
}