Query time 0.00141
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "70.81"
},
"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": 81,
"rows_produced_per_join": 81,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5389,5398,5469,5938,5959,4409,4691,4697,4863,5296,5355,5646,6117,11104,3447,3555,3793,4338,4408,4521,4554,4692,5252,5543))",
"cost_info": {
"read_cost": "34.36",
"eval_cost": "8.10",
"prefix_cost": "42.46",
"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": "20.25",
"eval_cost": "0.41",
"prefix_cost": "70.81",
"data_read_per_join": "12K"
},
"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 |
| 3447 |
166,423,448M |
| 3555 |
423,424,166M |
| 3793 |
423,166,448M |
| 4338 |
219,496,494M |
| 4408 |
219,496,494M |
| 4409 |
219,496,494M |
| 4521 |
219,496M |
| 4554 |
513,166,516M |
| 4691 |
497,219,504M |
| 4692 |
497,219,504M |
| 4697 |
497,219,494M |
| 4863 |
170,166,530M |
| 5252 |
328,402,405,342,362,166,250,410M |
| 5296 |
372,552,550M |
| 5355 |
372,552,550M |
| 5389 |
372,250,554,552,553,556M |
| 5398 |
250,372,554,553,552,556M |
| 5469 |
552,250,372,556,553,554M |
| 5543 |
553,250,552,554,372,556M |
| 5646 |
553,555,250,560,557,552,372,562M |
| 5938 |
329,166,457M |
| 5959 |
565,413,407,402,250,359,328,166,564,361M |
| 6117 |
423,166,449M |
| 11104 |
664M |