Query time 0.00135
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "47.61"
},
"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": 52,
"rows_produced_per_join": 52,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (6780,7279,7475,7477,7617,7197,2649,7478,7620,855,7618,4651,7472,7476,7619,3426,1580,2230,2828,5190,7505,4603,5378,7281))",
"cost_info": {
"read_cost": "24.21",
"eval_cost": "5.20",
"prefix_cost": "29.41",
"data_read_per_join": "832"
},
"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.00",
"eval_cost": "0.26",
"prefix_cost": "47.61",
"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 |
| 855 |
329,166,344M |
| 1580 |
404,402,328,166,341M |
| 2230 |
424,423,450,166M |
| 2649 |
167,166,444M |
| 2828 |
329,166,457M |
| 3426 |
332,333,245,480,417M |
| 4603 |
167,166,355M |
| 4651 |
250,371,393,395M |
| 5190 |
166,250,402,328,565,564M |
| 5378 |
538,521,539M |
| 6780 |
372,460M |
| 7197 |
623M |
| 7279 |
190,454M |
| 7281 |
454,190M |
| 7472 |
654M |
| 7475 |
654M |
| 7476 |
654M |
| 7477 |
654M |
| 7478 |
654M |
| 7505 |
654M |
| 7617 |
190,454M |
| 7618 |
190,454M |
| 7619 |
190,454M |
| 7620 |
190,454M |