Query time 0.00186
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "93.41"
},
"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": 76,
"rows_produced_per_join": 76,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5398,5469,5543,5470,5547,5534,5471,5538,5542,5548,6245,6253,6241,6207,6220,6243,6553,7516,11255,11277,11280,10412,7514,7521))",
"cost_info": {
"read_cost": "32.61",
"eval_cost": "7.60",
"prefix_cost": "40.21",
"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": 76,
"filtered": "100.00",
"cost_info": {
"read_cost": "19.00",
"eval_cost": "7.60",
"prefix_cost": "66.81",
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "19.00",
"eval_cost": "0.38",
"prefix_cost": "93.41",
"data_read_per_join": "11K"
},
"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 |
| 5398 |
250,372,554,553,552,556M |
0 |
| 5469 |
552,250,372,556,553,554M |
0 |
| 5470 |
250,372,556,553,552,554M |
0 |
| 5471 |
372,250,556,553,552,554M |
0 |
| 5534 |
552,372,250,556,553,554M |
0 |
| 5538 |
372,250,556,553,552,554M |
0 |
| 5542 |
553,250,552,554,372,556M |
0 |
| 5543 |
553,250,552,554,372,556M |
0 |
| 5547 |
553,250,552,554,372,556M |
0 |
| 5548 |
553,250,552,554,372,556M |
0 |
| 6207 |
556,554M |
0 |
| 6220 |
556,554M |
0 |
| 6241 |
556,554M |
0 |
| 6243 |
554,556M |
0 |
| 6245 |
556,554M |
0 |
| 6253 |
554,556M |
0 |
| 6553 |
556,554M |
0 |
| 7514 |
556,554M |
0 |
| 7516 |
556,554M |
0 |
| 7521 |
556,554M |
0 |
| 10412 |
554,556M |
0 |
| 11255 |
556,554M |
0 |
| 11277 |
556,554M |
0 |
| 11280 |
556,554M |
0 |