Query time 0.00204
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "59.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": 67,
"rows_produced_per_join": 67,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (4814,2204,1988,3939,5113,3423,6920,3084,4429,4819,7680,3031,3358,4522,5168,4784,1581,1769,4322,4411,4701,1582,4160,2739))",
"cost_info": {
"read_cost": "29.46",
"eval_cost": "6.70",
"prefix_cost": "36.16",
"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": "16.75",
"eval_cost": "0.34",
"prefix_cost": "59.61",
"data_read_per_join": "10K"
},
"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 |
| 1581 |
404,402,328,166,341M |
| 1582 |
404,402,328,166,341M |
| 1769 |
371,250,394M |
| 1988 |
371,250,393M |
| 2204 |
351,166,430M |
| 2739 |
329,166,457M |
| 3031 |
320,166,469M |
| 3084 |
166,322,471M |
| 3358 |
250,166,401,351,446M |
| 3423 |
329,166,457M |
| 3939 |
250,166,401,351,446M |
| 4160 |
513,166,515M |
| 4322 |
219,494,497,507M |
| 4411 |
386,308,350,250,166,382M |
| 4429 |
386,308,250,350,166,382M |
| 4522 |
219,496M |
| 4701 |
496,219,500M |
| 4784 |
245,334,422M |
| 4814 |
497,219,493M |
| 4819 |
497,219,498M |
| 5113 |
450,424,423,166M |
| 5168 |
329,166,457M |
| 6920 |
628M |
| 7680 |
460M |