Query time 0.00146
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "56.21"
},
"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": 64,
"rows_produced_per_join": 64,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (1284,1475,1476,1477,2922,2923,3048,3047,3046,3826,4101,4117,4116,4115,5703,5704,5705,1528,8505,8503))",
"cost_info": {
"read_cost": "27.41",
"eval_cost": "6.40",
"prefix_cost": "33.81",
"data_read_per_join": "1024"
},
"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.00",
"eval_cost": "0.32",
"prefix_cost": "56.21",
"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 |
| 1284 |
322,166,324M |
| 1475 |
166,322,324M |
| 1476 |
166,322,324M |
| 1477 |
166,322,324M |
| 1528 |
453,454,372,174,166,190M |
| 2922 |
423,424,450,166M |
| 2923 |
423,424,450,166M |
| 3046 |
234,166,470M |
| 3047 |
166,234,470M |
| 3048 |
166,234,470M |
| 3826 |
250,166,401,351,446M |
| 4101 |
166,351,401,250,446M |
| 4115 |
513,166,514M |
| 4116 |
513,166,514M |
| 4117 |
513,166,514M |
| 5703 |
423,449,166M |
| 5704 |
423,449,166M |
| 5705 |
423,449,166M |
| 8503 |
372,166,453,174,454,190M |
| 8505 |
174,454,372,166,453,190M |