Query time 0.00385
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "147.56"
},
"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": 166,
"rows_produced_per_join": 166,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (1600,1601,1609,1610,2314,2312,2310,2333,2430,2431,2559,2560,3663,2698,2702,2703,2805,2808,2822,2823,2824,2825,2826,2922,2923,2924,2925,2927,2928,2929,3090,3091,3092,3093,3094,3096,3097,3098,3114,3115,3131,3132,3133,3136,3137,3138,3140,3141,3142,3150,3151,3155,3156,2737,3255,3604,3603,3605,3606))",
"cost_info": {
"read_cost": "72.86",
"eval_cost": "16.60",
"prefix_cost": "89.46",
"data_read_per_join": "2K"
},
"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": 8,
"filtered": "5.00",
"cost_info": {
"read_cost": "41.50",
"eval_cost": "0.83",
"prefix_cost": "147.56",
"data_read_per_join": "26K"
},
"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 |
| 1600 |
166,378,379M |
| 1601 |
166,378,379M |
| 1609 |
166,378,379M |
| 1610 |
166,378,379M |
| 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 |
| 2702 |
423,424,450,166M |
| 2703 |
423,424,450,166M |
| 2737 |
423,424,451,166M |
| 2805 |
424,423,492,166M |
| 2808 |
423,424,492,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 |
| 2927 |
329,166,344M |
| 2928 |
329,166,344M |
| 2929 |
329,166,344M |
| 3090 |
329,166,344M |
| 3091 |
329,166,344M |
| 3092 |
329,166,344M |
| 3093 |
329,166,344M |
| 3094 |
329,166,344M |
| 3096 |
329,166,457M |
| 3097 |
329,166,457M |
| 3098 |
329,166,457M |
| 3114 |
492,452,424,423,166M |
| 3115 |
423,424,452,492,166M |
| 3131 |
166,378,379M |
| 3132 |
378,166,379M |
| 3133 |
378,166,379M |
| 3136 |
329,166,457M |
| 3137 |
329,166,457M |
| 3138 |
329,166,457M |
| 3140 |
329,166,344M |
| 3141 |
329,166,344M |
| 3142 |
329,166,347M |
| 3150 |
423,424,450,166M |
| 3151 |
423,424,450,166M |
| 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 |