Query time 0.00323
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "74.68"
},
"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": 84,
"rows_produced_per_join": 84,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5467,5554,5013,5237,8723,6785,5370,5855,2886,5444,5490,5921,5566,4989,5377,5429,5369,5497,5188,5567,5883,5904,5216,5483))",
"cost_info": {
"read_cost": "35.41",
"eval_cost": "8.40",
"prefix_cost": "43.81",
"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": "21.00",
"eval_cost": "0.42",
"prefix_cost": "73.21",
"data_read_per_join": "13K"
},
"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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.05",
"eval_cost": "0.42",
"prefix_cost": "74.68",
"data_read_per_join": "67"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 2886 |
372,384,459M |
0 |
| 4989 |
552,553,554,372,250,556M |
0 |
| 5013 |
561,555,557,552,553,372,250,563M |
0 |
| 5188 |
557,250,372,562,553,552,555,560M |
0 |
| 5216 |
372,550M |
0 |
| 5237 |
372,549M |
0 |
| 5369 |
554,553,250,372,552,556M |
0 |
| 5370 |
250,556,552,553,372,554M |
0 |
| 5377 |
250,372,553,554,552,556M |
0 |
| 5429 |
466,372,574M |
0 |
| 5444 |
466,372,574M |
0 |
| 5467 |
372,250,556,553,552,554M |
0 |
| 5483 |
466,372,575M |
0 |
| 5490 |
466,372,575M |
0 |
| 5497 |
466,372,573M |
0 |
| 5554 |
250,372,552,557,562,553,555,560M |
0 |
| 5566 |
554,553,250,552,372,556M |
0 |
| 5567 |
554,553,250,552,372,556M |
0 |
| 5855 |
572,372,582M |
0 |
| 5883 |
566,372,595M |
0 |
| 5904 |
566,372,595M |
0 |
| 5921 |
584M |
|
| 6785 |
372,587M |
0 |
| 8723 |
579M |
|