Query time 0.00133
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.61"
},
"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": 27,
"rows_produced_per_join": 27,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (8768,8770,8825,8827,8844,8848,8850,8851,8853,8856,8869,8870,8874,8876,8884,8895,8904,8913,8947,8951,8952,8953,8964,8967))",
"cost_info": {
"read_cost": "15.46",
"eval_cost": "2.70",
"prefix_cost": "18.16",
"data_read_per_join": "432"
},
"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": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "6.75",
"eval_cost": "0.14",
"prefix_cost": "27.61",
"data_read_per_join": "4K"
},
"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 |
| 8768 |
623M |
| 8770 |
623M |
| 8825 |
632M |
| 8827 |
632M |
| 8844 |
623M |
| 8848 |
623M |
| 8850 |
632M |
| 8851 |
632M |
| 8853 |
632M |
| 8856 |
574M |
| 8869 |
467M |
| 8870 |
466,579M |
| 8874 |
474M |
| 8876 |
474M |
| 8884 |
347M |
| 8895 |
347M |
| 8904 |
623M |
| 8913 |
623M |
| 8947 |
453,174,190,454M |
| 8951 |
632M |
| 8952 |
632M |
| 8953 |
632M |
| 8964 |
623M |
| 8967 |
623M |