Query time 0.01544
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "81.29"
},
"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": 90,
"rows_produced_per_join": 90,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.29",
"eval_cost": "9.00",
"prefix_cost": "18.29",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (86031,86032,86033,86034,86035,86036,86037,86038,86039,86040,86041,86042,86043,86044,86045,86046,86047,86048,86049,86050,86051,86052,86053,86054,86055,86056,86057,86058,86059,86060))"
}
},
{
"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": 90,
"filtered": "100.00",
"cost_info": {
"read_cost": "22.50",
"eval_cost": "9.00",
"prefix_cost": "49.79",
"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": [
"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": "22.50",
"eval_cost": "0.45",
"prefix_cost": "81.29",
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 86031 |
7224M,7148,7207 |
0 |
| 86032 |
7148,7207,7224M |
0 |
| 86033 |
7148,7207,7224M |
0 |
| 86034 |
7224M,7207,7148 |
0 |
| 86035 |
7224M,7207,7148 |
0 |
| 86036 |
7224M,7207,7148 |
0 |
| 86037 |
7224M,7207,7148 |
0 |
| 86038 |
7207,7148,7224M |
0 |
| 86039 |
7224M,7148,7207 |
0 |
| 86040 |
7224M,7207,7148 |
0 |
| 86041 |
7224M,7207,7148 |
0 |
| 86042 |
7148,7207,7224M |
0 |
| 86043 |
7148,7224M,7207 |
0 |
| 86044 |
7148,7224M,7207 |
0 |
| 86045 |
7148,7224M,7207 |
0 |
| 86046 |
7224M,7207,7148 |
0 |
| 86047 |
7148,7207,7224M |
0 |
| 86048 |
7224M,7207,7148 |
0 |
| 86049 |
7224M,7148,7207 |
0 |
| 86050 |
7224M,7207,7148 |
0 |
| 86051 |
7224M,7207,7148 |
0 |
| 86052 |
7224M,7207,7148 |
0 |
| 86053 |
7148,7224M,7207 |
0 |
| 86054 |
7224M,7207,7148 |
0 |
| 86055 |
7148,7224M,7207 |
0 |
| 86056 |
7207,7224M,7148 |
0 |
| 86057 |
7207,7148,7224M |
0 |
| 86058 |
7207,7148,7224M |
0 |
| 86059 |
7207,7148,7224M |
0 |
| 86060 |
7207,7148,7224M |
0 |