Query time 0.00206
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "87.96"
},
"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": 99,
"rows_produced_per_join": 99,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2314,2312,2310,2333,2430,2431,2559,2560,3663,2698,2822,2823,2824,2825,2826,2922,2923,2924,2925,3090,3091,3092,3093,3094,3136,3137,3138,3155,3156,2737,3255,3604,3603,3605,3606))",
"cost_info": {
"read_cost": "43.41",
"eval_cost": "9.90",
"prefix_cost": "53.31",
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.75",
"eval_cost": "0.50",
"prefix_cost": "87.96",
"data_read_per_join": "15K"
},
"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 |
| 2310 |
166,378,379M |
| 2312 |
378,166,379M |
| 2314 |
378,166,379M |
| 2333 |
166,378,379M |
| 2430 |
423,424,450,166M |
| 2431 |
423,424,450,166M |
| 2559 |
329,166,344M |
| 2560 |
329,166,344M |
| 2698 |
450,424,423,166M |
| 2737 |
423,424,451,166M |
| 2822 |
329,166,344M |
| 2823 |
329,166,344M |
| 2824 |
329,166,344M |
| 2825 |
329,166,344M |
| 2826 |
329,166,344M |
| 2922 |
423,424,450,166M |
| 2923 |
423,424,450,166M |
| 2924 |
423,424,451,166M |
| 2925 |
423,424,451,166M |
| 3090 |
329,166,344M |
| 3091 |
329,166,344M |
| 3092 |
329,166,344M |
| 3093 |
329,166,344M |
| 3094 |
329,166,344M |
| 3136 |
329,166,457M |
| 3137 |
329,166,457M |
| 3138 |
329,166,457M |
| 3155 |
423,424,451,166M |
| 3156 |
423,424,451,166M |
| 3255 |
423,424,451,166M |
| 3603 |
451,424,423,166M |
| 3604 |
424,423,451,166M |
| 3605 |
424,423,166,451M |
| 3606 |
166,424,423,451M |
| 3663 |
329,166,344M |