Query time 0.00175
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "50.66"
},
"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": 58,
"rows_produced_per_join": 58,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3750,3830,3517,3592,3600,3874,3365,3879,3753,3230,3303,3376,3412,3554,3530,3545,3555))",
"cost_info": {
"read_cost": "24.56",
"eval_cost": "5.80",
"prefix_cost": "30.36",
"data_read_per_join": "928"
},
"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": "14.50",
"eval_cost": "0.29",
"prefix_cost": "50.66",
"data_read_per_join": "9K"
},
"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 |
| 3230 |
450,424,423,166M |
| 3303 |
450,424,423,166M |
| 3365 |
424,423,452,166M |
| 3376 |
492,424,423,166M |
| 3412 |
451,424,423,166M |
| 3517 |
329,166,344M |
| 3530 |
423,424,166M |
| 3545 |
423,424,450,166M |
| 3554 |
423,424,166M |
| 3555 |
423,424,166M |
| 3592 |
424,423,452,166M |
| 3600 |
424,423,166,492M |
| 3750 |
452,424,423,166,492M |
| 3753 |
492,452,424,423,166M |
| 3830 |
452,424,423,166M |
| 3874 |
423,452,424,166M |
| 3879 |
452,347,329,424,423,166,492M |