Query time 0.00283
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "102.47"
},
"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": 180,
"rows_produced_per_join": 180,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "18.33",
"eval_cost": "18.00",
"prefix_cost": "36.33",
"data_read_per_join": "2K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92136,92137,84026,84027,84028,84029,85580,89486,89014,84018,84019,84020,84021,92019,92020,92021,92022,92023,92024,92025,92107,92108,92109,92110,92111,92112,92113,89626,89639,83097,92151,92152,92153,92353,92354,92355,92356,89651,89652,84103,83974,83975,83976,83977,84014,84015,84016,84017,84036,88933,89011,89523,90109,91308,91893,91894,91895,92050,92138,92337,92338,92339,92340,83954,83956,83958,83960,90061,85531,89623,89636,83978,83979,83980,83981,90106,88936,89648,89649,83970,83971,83972,83973,89620,89633,91304,83982,83983,83984,83985,91300,89650,89187,90067,90081,91839))"
}
},
{
"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": 9,
"filtered": "5.00",
"cost_info": {
"read_cost": "45.00",
"eval_cost": "0.90",
"prefix_cost": "99.33",
"data_read_per_join": "23K"
},
"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": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.25",
"eval_cost": "0.90",
"prefix_cost": "102.48",
"data_read_per_join": "144"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83097 |
7185M |
|
| 83954 |
7186M |
|
| 83956 |
7186M |
|
| 83958 |
7186M |
|
| 83960 |
7186M |
|
| 83970 |
7184,7187M |
0 |
| 83971 |
7184,7187M |
0 |
| 83972 |
7184,7187M |
0 |
| 83973 |
7184,7187M |
0 |
| 83974 |
7188M |
|
| 83975 |
7188M |
|
| 83976 |
7188M |
|
| 83977 |
7188M |
|
| 83978 |
7184,7187M |
0 |
| 83979 |
7184,7187M |
0 |
| 83980 |
7184,7187M |
0 |
| 83981 |
7184,7187M |
0 |
| 83982 |
7186M |
|
| 83983 |
7186M |
|
| 83984 |
7186M |
|
| 83985 |
7186M |
|
| 84014 |
7184,7187M |
0 |
| 84015 |
7184,7187M |
0 |
| 84016 |
7184,7187M |
0 |
| 84017 |
7184,7187M |
0 |
| 84018 |
7188M |
|
| 84019 |
7188M |
|
| 84020 |
7188M |
|
| 84021 |
7188M |
|
| 84026 |
7186M |
|
| 84027 |
7186M |
|
| 84028 |
7186M |
|
| 84029 |
7186M |
|
| 84036 |
7184,7187M |
0 |
| 84103 |
7185M |
|
| 85531 |
7185M |
|
| 85580 |
7341,7342,7343,7157M |
|
| 88933 |
7185M |
|
| 88936 |
7184,7187M |
0 |
| 89011 |
7184,7187M |
0 |
| 89014 |
7184,7187M |
0 |
| 89187 |
7186M |
|
| 89486 |
7185M |
|
| 89523 |
7186M |
|
| 89620 |
7185M |
|
| 89623 |
7186M |
|
| 89626 |
7186M |
|
| 89633 |
7185M |
|
| 89636 |
7186M |
|
| 89639 |
7186M |
|
| 89648 |
7184,7187M |
0 |
| 89649 |
7186M |
|
| 89650 |
7184,7187M |
0 |
| 89651 |
7184,7187M |
0 |
| 89652 |
7186M |
|
| 90061 |
7186M |
|
| 90067 |
7185M |
|
| 90081 |
7186M |
|
| 90106 |
7186M |
|
| 90109 |
7184,7187M |
0 |
| 91300 |
7185M |
|
| 91304 |
7186M |
|
| 91308 |
7186M |
|
| 91839 |
7341,7342,7343,7157M |
|
| 91893 |
7341,7342,7343,7157M |
|
| 91894 |
7341,7342,7343,7157M |
|
| 91895 |
7341,7342,7343,7157M |
|
| 92019 |
7187,7184M |
0 |
| 92020 |
7187,7184M |
0 |
| 92021 |
7187,7184M |
0 |
| 92022 |
7187,7184M |
0 |
| 92023 |
7187,7184M |
0 |
| 92024 |
7187,7184M |
0 |
| 92025 |
7187,7184M |
0 |
| 92050 |
7186M |
|
| 92107 |
7187,7184M |
0 |
| 92108 |
7187,7184M |
0 |
| 92109 |
7187,7184M |
0 |
| 92110 |
7187,7184M |
0 |
| 92111 |
7187,7184M |
0 |
| 92112 |
7187,7184M |
0 |
| 92113 |
7187,7184M |
0 |
| 92136 |
7187,7184M |
0 |
| 92137 |
7187,7184M |
0 |
| 92138 |
7186M |
|
| 92151 |
7341,7342,7343,7157M |
|
| 92152 |
7341,7342,7343,7157M |
|
| 92153 |
7341,7342,7343,7157M |
|
| 92337 |
7341,7342,7343,7157M |
|
| 92338 |
7341,7342,7343,7157M |
|
| 92339 |
7341,7342,7343,7157M |
|
| 92340 |
7341,7342,7343,7157M |
|
| 92353 |
7341,7342,7343,7157M |
|
| 92354 |
7341,7342,7343,7157M |
|
| 92355 |
7341,7342,7343,7157M |
|
| 92356 |
7341,7342,7343,7157M |
|