Query time 0.00148
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "58.75"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 103,
"rows_produced_per_join": 103,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "10.60",
"eval_cost": "10.30",
"prefix_cost": "20.90",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (85562,85542,85603,92475,85547,85569,91876,85545,85568,85544,84237,85548,85558,93282,93283,93284,93285,93286,93287,93288,93289,93290,93291,93294,93338,93339,94428,94452,94453,94454))"
}
},
{
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "25.75",
"eval_cost": "0.52",
"prefix_cost": "56.95",
"data_read_per_join": "13K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`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",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.29",
"eval_cost": "0.52",
"prefix_cost": "58.75",
"data_read_per_join": "82"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 84237 |
7341,7342,7343,7157M |
|
| 85542 |
7313,7338,7219M |
0 |
| 85544 |
7313,7338,7219M |
0 |
| 85545 |
7341,7342,7343,7157M |
|
| 85547 |
7313,7338,7219M |
0 |
| 85548 |
7341,7342,7343,7157M |
|
| 85558 |
7313,7338,7219M |
0 |
| 85562 |
7313,7338,7219M |
0 |
| 85568 |
7313,7338,7219M |
0 |
| 85569 |
7341,7342,7343,7157M |
|
| 85603 |
7313,7338,7219M |
0 |
| 91876 |
7341,7342,7343,7157M |
|
| 92475 |
7313,7338,7219M |
0 |
| 93282 |
7313,7338,7219M |
0 |
| 93283 |
7341,7342,7343,7157M |
|
| 93284 |
7313,7338,7219M |
0 |
| 93285 |
7341,7342,7343,7157M |
|
| 93286 |
7313,7338,7219M |
0 |
| 93287 |
7341,7342,7343,7157M |
|
| 93288 |
7313,7338,7219M |
0 |
| 93289 |
7341,7342,7343,7157M |
|
| 93290 |
7313,7338,7219M |
0 |
| 93291 |
7341,7342,7343,7157M |
|
| 93294 |
7313,7338,7219M |
0 |
| 93338 |
7313,7338,7219M |
0 |
| 93339 |
7313,7338,7219M |
0 |
| 94428 |
7313,7338,7219M |
0 |
| 94452 |
7341,7342,7343,7157M |
|
| 94453 |
7341,7342,7343,7157M |
|
| 94454 |
7341,7342,7343,7157M |
|