Query time 0.00174
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "65.21"
},
"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": 74,
"rows_produced_per_join": 74,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2623,2729,2098,1664,2761,2774,5794,2702,3564,4836,3269,1548,2455,4085,4231,3147,4058,5207,6099,5037,5737,10033,4176,6385))",
"cost_info": {
"read_cost": "31.91",
"eval_cost": "7.40",
"prefix_cost": "39.31",
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "18.50",
"eval_cost": "0.37",
"prefix_cost": "65.21",
"data_read_per_join": "11K"
},
"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 |
| 1548 |
170,166,358M |
| 1664 |
308,350,386,250,166,382M |
| 2098 |
371,250,397,395M |
| 2455 |
454,453,372,166,174,190M |
| 2623 |
166,234,236M |
| 2702 |
423,424,450,166M |
| 2729 |
329,166,344M |
| 2761 |
329,166,457M |
| 2774 |
461,372,464M |
| 3147 |
423,424,450,166M |
| 3269 |
245,334,421M |
| 3564 |
167,166,354M |
| 4058 |
386,308,350,250,166,382M |
| 4085 |
167,166,353M |
| 4176 |
513,166,515M |
| 4231 |
387,308,250,350,166,383M |
| 4836 |
496,219,499M |
| 5037 |
234,166,559M |
| 5207 |
372,250,555,557,552,553,563,561M |
| 5737 |
461,372,462M |
| 5794 |
450,424,423,166M |
| 6099 |
166,423,586M |
| 6385 |
372,583M |
| 10033 |
166M |