Query time 0.00227
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "66.01"
},
"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": 75,
"rows_produced_per_join": 75,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5703,4115,5832,1284,1528,1563,1588,6752,5824,1570,3826,2244,2336,5798,3603,2693,3928,6712,3053,8102,2333,2338,5826,2809))",
"cost_info": {
"read_cost": "32.26",
"eval_cost": "7.50",
"prefix_cost": "39.76",
"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": "18.75",
"eval_cost": "0.38",
"prefix_cost": "66.01",
"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 |
| 1284 |
322,166,324M |
| 1528 |
453,454,372,174,166,190M |
| 1563 |
411,405,402,342,328,166,363M |
| 1570 |
402,411,405,342,328,166,363M |
| 1588 |
410,405,402,342,328,166,362M |
| 2244 |
166,378,432M |
| 2333 |
166,378,379M |
| 2336 |
166,378,379M |
| 2338 |
424,423,452,166M |
| 2693 |
423,424,166M |
| 2809 |
329,166,347M |
| 3053 |
234,166,470M |
| 3603 |
451,424,423,166M |
| 3826 |
250,166,401,351,446M |
| 3928 |
423,448,166M |
| 4115 |
513,166,514M |
| 5703 |
423,449,166M |
| 5798 |
423,450,424,166M |
| 5824 |
423,477,166M |
| 5826 |
426,424,423,166M |
| 5832 |
423,477,166M |
| 6712 |
590M |
| 6752 |
590M |
| 8102 |
642M |