Query time 0.00132
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "67.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": 77,
"rows_produced_per_join": 77,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (8339,11260,5062,3739,4459,4580,5189,5246,5347,5504,5799,5805,5903,7991,8340,11550,5218,6837,3444,4068,4302,5172,5184,5960))",
"cost_info": {
"read_cost": "32.96",
"eval_cost": "7.70",
"prefix_cost": "40.66",
"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": "19.25",
"eval_cost": "0.39",
"prefix_cost": "67.61",
"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 |
| 3444 |
166,423,448M |
| 3739 |
166,423,448M |
| 4068 |
219,496M |
| 4302 |
513,166,515M |
| 4459 |
387,308,250,350,166,383M |
| 4580 |
167,166,355M |
| 5062 |
513,166,516M |
| 5172 |
166,378M |
| 5184 |
563,250,555,557,552,553,372,561M |
| 5189 |
250,372,557,555,553,560,552,562M |
| 5218 |
372,550M |
| 5246 |
407,359,328,402,361,166,250,413M |
| 5347 |
372,552,550M |
| 5504 |
522,521,535M |
| 5799 |
372,583M |
| 5805 |
372,583M |
| 5903 |
566,372,595M |
| 5960 |
404,402,250,328,166,341M |
| 6837 |
628M |
| 7991 |
395M |
| 8339 |
637M |
| 8340 |
637M |
| 11260 |
664M |
| 11550 |
664M |