Query time 0.00152
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "82.91"
},
"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": 93,
"rows_produced_per_join": 93,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2302,2301,2363,2364,2365,2550,2549,2548,2544,2551,2552,2559,2560,3663,2579,2580,2637,2638,3155,3156,2737,3255,3834,3835,4126,4127,4128,4129,4294,4295,4316,4317,4796,4797))",
"cost_info": {
"read_cost": "41.06",
"eval_cost": "9.30",
"prefix_cost": "50.36",
"data_read_per_join": "1K"
},
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "23.25",
"eval_cost": "0.47",
"prefix_cost": "82.91",
"data_read_per_join": "14K"
},
"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 |
| 2301 |
167,166,444M |
| 2302 |
167,166,444M |
| 2363 |
166,329,347M |
| 2364 |
329,166,347M |
| 2365 |
329,166,347M |
| 2544 |
234,166,236M |
| 2548 |
166,234,236M |
| 2549 |
166,234,236M |
| 2550 |
166,234,236M |
| 2551 |
166,234,236M |
| 2552 |
166,234,236M |
| 2559 |
329,166,344M |
| 2560 |
329,166,344M |
| 2579 |
234,166,236M |
| 2580 |
166,234,236M |
| 2637 |
320,166,339M |
| 2638 |
166,320,339M |
| 2737 |
423,424,451,166M |
| 3155 |
423,424,451,166M |
| 3156 |
423,424,451,166M |
| 3255 |
423,424,451,166M |
| 3663 |
329,166,344M |
| 3834 |
423,424,450,166M |
| 3835 |
423,424,450,166M |
| 4126 |
513,166,516M |
| 4127 |
513,166,516M |
| 4128 |
513,166,516M |
| 4129 |
513,166,516M |
| 4294 |
386,308,250,350,166,382M |
| 4295 |
350,250,308,386,166,382M |
| 4316 |
320,166,321M |
| 4317 |
166,320,321M |
| 4796 |
320,166,325M |
| 4797 |
166,320,325M |