Query time 0.02070
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "135.08"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "9.88"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 208,
"rows_produced_per_join": 8,
"filtered": "4.00",
"cost_info": {
"read_cost": "20.72",
"eval_cost": "0.83",
"prefix_cost": "21.55",
"data_read_per_join": "21K"
},
"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": "cscart_products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"nuie_scalesta_net.cscart_categories.category_id"
],
"rows_examined_per_scan": 117,
"rows_produced_per_join": 9,
"filtered": "1.01",
"cost_info": {
"read_cost": "2.33",
"eval_cost": "0.99",
"prefix_cost": "121.75",
"data_read_per_join": "158"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92337,92338,92339,92340,88093,84704,84707,91054,90824,90825,89173,91839,87232,87233,87237,87238,87242,87243,87247,87248,88509,88513,88950,88951,88952,90321,90322,92450,92451,92452,92453,92454,92455,92456,91838,86859,88142,88145,88520,91885,87878,91837,91886,91887,92329,92330,92331,92332,92500,86278,86279,82385,82362,84696,88938,84699,88516,88519,88949,92000,85039,92424,92425,92426,92427,92428,92429,92431,88940,84251,84256,87580,87595,87610,88791,87370,89609,89610,84703,84706,91053,92432,92433,92434,92435,92436,92437,92438,88941,88512,92173,92174,92395,92396,92397,92398))"
}
},
{
"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.47",
"eval_cost": "0.99",
"prefix_cost": "125.20",
"data_read_per_join": "158"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82362 |
7151M,7301 |
|
| 82385 |
7160M,7305 |
|
| 84251 |
7194M |
|
| 84256 |
7194M |
|
| 84696 |
7208M,7241,7309,7346 |
|
| 84699 |
7208M,7241,7309,7346 |
|
| 84703 |
7208M,7241,7309,7346 |
|
| 84704 |
7208M,7241,7309,7346 |
|
| 84706 |
7208M,7241,7309,7346 |
|
| 84707 |
7208M,7241,7309,7346 |
|
| 85039 |
7157M,7341,7342,7343 |
|
| 86278 |
7148,7163,7164M |
0 |
| 86279 |
7148,7163,7164M |
0 |
| 86859 |
7148,7207M |
0 |
| 87232 |
7194M |
|
| 87233 |
7194M |
|
| 87237 |
7194M |
|
| 87238 |
7194M |
|
| 87242 |
7194M |
|
| 87243 |
7194M |
|
| 87247 |
7194M |
|
| 87248 |
7194M |
|
| 87370 |
7157M,7341,7342,7343 |
|
| 87580 |
7194M |
|
| 87595 |
7194M |
|
| 87610 |
7194M |
|
| 87878 |
7208M,7241,7309,7346 |
|
| 88093 |
7148,7158M |
0 |
| 88142 |
7208M,7241,7309,7346 |
|
| 88145 |
7208M,7241,7309,7346 |
|
| 88509 |
7208M,7241,7309,7346 |
|
| 88512 |
7208M,7241,7309,7346 |
|
| 88513 |
7208M,7241,7309,7346 |
|
| 88516 |
7208M,7241,7309,7346 |
|
| 88519 |
7208M,7241,7309,7346 |
|
| 88520 |
7148,7207,7208M |
0 |
| 88791 |
7194M |
|
| 88938 |
7208M,7241,7309,7346 |
|
| 88940 |
7208M,7241,7309,7346 |
|
| 88941 |
7208M,7241,7309,7346 |
|
| 88949 |
7148,7207,7208M |
0 |
| 88950 |
7208M,7241,7309,7346 |
|
| 88951 |
7208M,7241,7309,7346 |
|
| 88952 |
7208M,7241,7309,7346 |
|
| 89173 |
7247M,7265 |
|
| 89609 |
7157M,7341,7342,7343 |
|
| 89610 |
7157M,7341,7342,7343 |
|
| 90321 |
7247M,7265 |
|
| 90322 |
7247M,7265 |
|
| 90824 |
7194M |
|
| 90825 |
7194M |
|
| 91053 |
7208M,7241,7309,7346 |
|
| 91054 |
7208M,7241,7309,7346 |
|
| 91837 |
7157M,7341,7342,7343 |
|
| 91838 |
7157M,7341,7342,7343 |
|
| 91839 |
7157M,7341,7342,7343 |
|
| 91885 |
7225M,7226 |
|
| 91886 |
7225M,7226 |
|
| 91887 |
7225M,7226 |
|
| 92000 |
7225M,7226 |
|
| 92173 |
7148M,7156,7157 |
0 |
| 92174 |
7148M,7156,7157 |
0 |
| 92329 |
7225M,7226 |
|
| 92330 |
7225M,7226 |
|
| 92331 |
7225M,7226 |
|
| 92332 |
7225M,7226 |
|
| 92337 |
7157M,7341,7342,7343 |
|
| 92338 |
7157M,7341,7342,7343 |
|
| 92339 |
7157M,7341,7342,7343 |
|
| 92340 |
7157M,7341,7342,7343 |
|
| 92395 |
7148M,7156,7157 |
0 |
| 92396 |
7148M,7156,7157 |
0 |
| 92397 |
7148M,7156,7157 |
0 |
| 92398 |
7148M,7156,7157 |
0 |
| 92424 |
7263M |
|
| 92425 |
7263M |
|
| 92426 |
7263M |
|
| 92427 |
7263M |
|
| 92428 |
7263M |
|
| 92429 |
7263M |
|
| 92431 |
7263M |
|
| 92432 |
7263M |
|
| 92433 |
7263M |
|
| 92434 |
7263M |
|
| 92435 |
7263M |
|
| 92436 |
7263M |
|
| 92437 |
7263M |
|
| 92438 |
7263M |
|
| 92450 |
7157M,7341,7342,7343 |
|
| 92451 |
7157M,7341,7342,7343 |
|
| 92452 |
7157M,7341,7342,7343 |
|
| 92453 |
7157M,7341,7342,7343 |
|
| 92454 |
7157M,7341,7342,7343 |
|
| 92455 |
7157M,7341,7342,7343 |
|
| 92456 |
7157M,7341,7342,7343 |
|
| 92500 |
7157M,7341,7342,7343 |
|