Query time 0.00305
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "142.86"
},
"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": 119,
"rows_produced_per_join": 119,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5625,3751,4231,5932,4431,4460,5613,3752,4293,4205,5927,4470,5815,4258,5866,4271,6162,4471,5857,4291,5862,6113,5808,5616))",
"cost_info": {
"read_cost": "47.66",
"eval_cost": "11.90",
"prefix_cost": "59.56",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": 119,
"filtered": "100.00",
"cost_info": {
"read_cost": "29.75",
"eval_cost": "11.90",
"prefix_cost": "101.21",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"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": "29.75",
"eval_cost": "0.60",
"prefix_cost": "142.86",
"data_read_per_join": "18K"
},
"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 |
position |
| 3751 |
350,166,308,250,387,383M |
0 |
| 3752 |
350,166,387,250,308,383M |
0 |
| 4205 |
387,308,250,350,166,383M |
0 |
| 4231 |
387,308,250,350,166,383M |
0 |
| 4258 |
387,308,250,350,166,383M |
0 |
| 4271 |
387,308,250,350,166,383M |
0 |
| 4291 |
383,308,250,350,166,387M |
0 |
| 4293 |
387,308,250,350,166,383M |
0 |
| 4431 |
387,308,250,350,166,383M |
0 |
| 4460 |
387,308,250,350,166,383M |
0 |
| 4470 |
387,308,250,350,166,383M |
0 |
| 4471 |
387,308,250,350,166,383M |
0 |
| 5613 |
387,308,250,350,166,383M |
0 |
| 5616 |
308,387,250,350,166,383M |
0 |
| 5625 |
308,387,250,350,166,383M |
0 |
| 5808 |
308,387,250,350,166,383M |
0 |
| 5815 |
308,250,383,350,166,387M |
0 |
| 5857 |
308,250,350,166,387,383M |
0 |
| 5862 |
423,308,387,250,350,166,383M |
0 |
| 5866 |
423,308,387,250,350,166,383M |
0 |
| 5927 |
308,250,350,423,166,387,383M |
0 |
| 5932 |
423,308,387,250,350,166,383M |
0 |
| 6113 |
350,166,308,387,250,383M |
0 |
| 6162 |
350,166,387,308,250,383M |
0 |