Query time 0.00225
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "62.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": 71,
"rows_produced_per_join": 71,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5677,6869,7504,7819,8022,2837,4593,5004,5517,5582,6036,7803,7824,8055,11212,11557,3937,3035,3220,3410,3561,3963,3984,3986))",
"cost_info": {
"read_cost": "30.86",
"eval_cost": "7.10",
"prefix_cost": "37.96",
"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": "17.75",
"eval_cost": "0.36",
"prefix_cost": "62.81",
"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 |
| 2837 |
329,166,347M |
| 3035 |
423,424,451,166M |
| 3220 |
450,424,423,166M |
| 3410 |
423,424,166M |
| 3561 |
167,166,354M |
| 3937 |
351,250,166,401,446M |
| 3963 |
341,328,402,250,166,404M |
| 3984 |
167,166,356M |
| 3986 |
250,166,351,401,446M |
| 4593 |
513,166,517M |
| 5004 |
561,555,557,552,553,372,250,563M |
| 5517 |
466,372,573M |
| 5582 |
572,372,582M |
| 5677 |
553,555,250,560,557,552,372,562M |
| 6036 |
423,166,585M |
| 6869 |
620M |
| 7504 |
623M |
| 7803 |
630M |
| 7819 |
630M |
| 7824 |
630M |
| 8022 |
627M |
| 8055 |
627M |
| 11212 |
664M |
| 11557 |
664M |