Query time 0.00147
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "49.10"
},
"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": 86,
"rows_produced_per_join": 86,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.89",
"eval_cost": "8.60",
"prefix_cost": "17.49",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92354,92355,92356,88953,88954,87879,82403,82410,82424,91893,91894,91895,92337,92338,92339,92340,88093,84704,84707,91054,90824,90825,89173,91839,87232,87233,87237,87238,87242,87243))"
}
},
{
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "21.50",
"eval_cost": "0.43",
"prefix_cost": "47.59",
"data_read_per_join": "11K"
},
"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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.08",
"eval_cost": "0.43",
"prefix_cost": "49.10",
"data_read_per_join": "68"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82403 |
7301,7151M |
|
| 82410 |
7301,7151M |
|
| 82424 |
7301,7151M |
|
| 84704 |
7241,7309,7346,7208M |
|
| 84707 |
7241,7309,7346,7208M |
|
| 87232 |
7194M |
|
| 87233 |
7194M |
|
| 87237 |
7194M |
|
| 87238 |
7194M |
|
| 87242 |
7194M |
|
| 87243 |
7194M |
|
| 87879 |
7241,7309,7346,7208M |
|
| 88093 |
7148,7158M |
0 |
| 88953 |
7241,7309,7346,7208M |
|
| 88954 |
7241,7309,7346,7208M |
|
| 89173 |
7265,7247M |
|
| 90824 |
7194M |
|
| 90825 |
7194M |
|
| 91054 |
7241,7309,7346,7208M |
|
| 91839 |
7341,7342,7343,7157M |
|
| 91893 |
7341,7342,7343,7157M |
|
| 91894 |
7341,7342,7343,7157M |
|
| 91895 |
7341,7342,7343,7157M |
|
| 92337 |
7341,7342,7343,7157M |
|
| 92338 |
7341,7342,7343,7157M |
|
| 92339 |
7341,7342,7343,7157M |
|
| 92340 |
7341,7342,7343,7157M |
|
| 92354 |
7341,7342,7343,7157M |
|
| 92355 |
7341,7342,7343,7157M |
|
| 92356 |
7341,7342,7343,7157M |
|