Query time 0.00135
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "48.41"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 53,
"rows_produced_per_join": 53,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (10656,10657,10658,10659,10660,10681,10682,10690,10702,10865,10986,10997,11026,11048,11049,11059,11098,11113,11144,11262,11268,11283,11314,11329))",
"cost_info": {
"read_cost": "24.56",
"eval_cost": "5.30",
"prefix_cost": "29.86",
"data_read_per_join": "848"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "13.25",
"eval_cost": "0.27",
"prefix_cost": "48.41",
"data_read_per_join": "8K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,1)) and ((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
| 10656 |
617M |
| 10657 |
617M |
| 10658 |
617M |
| 10659 |
617M |
| 10660 |
618M |
| 10681 |
618M |
| 10682 |
618M |
| 10690 |
618M |
| 10702 |
620M |
| 10865 |
473M |
| 10986 |
574M |
| 10997 |
574M |
| 11026 |
664M |
| 11048 |
587M |
| 11049 |
587M |
| 11059 |
666,667M |
| 11098 |
556,554M |
| 11113 |
667,666M |
| 11144 |
664M |
| 11262 |
554,556M |
| 11268 |
664M |
| 11283 |
556,554M |
| 11314 |
556,554M |
| 11329 |
579M |