Query time 0.00259
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "4.60"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "1.00"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_banners",
"access_type": "ref",
"possible_keys": [
"status",
"company_id"
],
"key": "company_id",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "1.20",
"data_read_per_join": "2K"
},
"used_columns": [
"banner_id",
"status",
"type",
"target",
"timestamp",
"abt__ut2_use_avail_period",
"abt__ut2_avail_from",
"abt__ut2_avail_till",
"company_id"
],
"attached_condition": "((`webmarco`.`cscart_banners`.`status` = 'A') and (if((not((`webmarco`.`cscart_banners`.`type` like 'abt__ut2'))),'available',if(((`webmarco`.`cscart_banners`.`type` like 'abt__ut2') and ((`webmarco`.`cscart_banners`.`abt__ut2_use_avail_period` = 'N') or ((`webmarco`.`cscart_banners`.`abt__ut2_use_avail_period` = 'Y') and ((`webmarco`.`cscart_banners`.`abt__ut2_avail_from` = 0) or (`webmarco`.`cscart_banners`.`abt__ut2_avail_from` <= 1732925033)) and ((`webmarco`.`cscart_banners`.`abt__ut2_avail_till` = 0) or (`webmarco`.`cscart_banners`.`abt__ut2_avail_till` >= 1732925033))))),'available','not available')) = 'available'))"
}
},
{
"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": [
"webmarco.cscart_banners.banner_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "2.40",
"data_read_per_join": "5K"
},
"used_columns": [
"banner_id",
"banner",
"url",
"description",
"lang_code",
"et_text",
"et_settings"
]
}
},
{
"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": [
"webmarco.cscart_banners.banner_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "3.60",
"data_read_per_join": "16"
},
"used_columns": [
"banner_image_id",
"banner_id",
"lang_code"
],
"attached_condition": "<if>(found_match(cscart_banner_images), ((`webmarco`.`cscart_banners`.`type` <> 'G') or (`webmarco`.`cscart_banner_images`.`banner_image_id` is not null)), true)"
}
}
]
}
}
}