Query time 0.00234
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "100.75"
},
"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": 111,
"rows_produced_per_join": 111,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (908,3090,2372,2752,1143,2359,2559,2363,2845,2822,2603,3136,2253,2367,2854,2751,2809,2255,2587,2927,2729,2761,3140,1542,2374,2694,3026,3142,853,2812,3096,1540,1544,2736,4887,2723,2829,2742,3556,2251))",
"cost_info": {
"read_cost": "48.86",
"eval_cost": "11.10",
"prefix_cost": "59.96",
"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": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "27.75",
"eval_cost": "0.56",
"prefix_cost": "98.81",
"data_read_per_join": "17K"
},
"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')))"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.39",
"eval_cost": "0.56",
"prefix_cost": "100.75",
"data_read_per_join": "88"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 853 |
329,166,344M |
0 |
| 908 |
329,166,344M |
0 |
| 1143 |
329,166,344M |
0 |
| 1540 |
329,166,344M |
0 |
| 1542 |
329,166,344M |
0 |
| 1544 |
329,166,344M |
0 |
| 2251 |
329,166,344M |
0 |
| 2253 |
329,166,344M |
0 |
| 2255 |
329,166,344M |
0 |
| 2359 |
329,455,453,372,337,174,166,527M |
0 |
| 2363 |
166,329,347M |
0 |
| 2367 |
329,166,347M |
0 |
| 2372 |
329,166,347M |
0 |
| 2374 |
329,166,347M |
0 |
| 2559 |
329,166,344M |
0 |
| 2587 |
329,166,457M |
0 |
| 2603 |
329,166,457M |
0 |
| 2694 |
329,166,457M |
0 |
| 2723 |
329,166,457M |
0 |
| 2729 |
329,166,344M |
0 |
| 2736 |
329,166,344M |
0 |
| 2742 |
329,166,457M |
0 |
| 2751 |
329,166,344M |
0 |
| 2752 |
329,166,344M |
0 |
| 2761 |
329,166,457M |
0 |
| 2809 |
329,166,347M |
0 |
| 2812 |
527,329,455,453,372,174,166,337M |
0 |
| 2822 |
329,166,344M |
0 |
| 2829 |
329,166,347M |
0 |
| 2845 |
329,166,347M |
0 |
| 2854 |
329,166,347M |
0 |
| 2927 |
329,166,344M |
0 |
| 3026 |
329,166,344M |
0 |
| 3090 |
329,166,344M |
0 |
| 3096 |
329,166,457M |
0 |
| 3136 |
329,166,457M |
0 |
| 3140 |
329,166,344M |
0 |
| 3142 |
329,166,347M |
0 |
| 3556 |
329,166,457M |
0 |
| 4887 |
329,166,344M |
0 |