Query time 0.01809
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "136.02"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "10.57"
},
"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": 10,
"filtered": "1.08",
"cost_info": {
"read_cost": "2.33",
"eval_cost": "1.06",
"prefix_cost": "121.75",
"data_read_per_join": "169"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92480,92481,92482,86386,86891,90068,92002,92090,91868,89601,92227,92210,83090,84097,85554,85577,85570,89529,83945,89598,85552,89600,85576,85584,85543,85592,92239,85571,85573,85574,91877,91878,91879,91880,91881,91882,91883,85555,85594,85564,90025,85575,86889,87888,92185,85561,85591,85597,85600,90310,90755,86893,85553,85556,85557,85559,85589,85593,85601,85602,85560,85587,85588,85604,85562,85542,85603,92475,85547,85569,91876,85545,85868,85870,85871,85568,85544,84237,85548,85558,92838,92839,92895,92896,92897,92898,92899,92900,92901,92902,92903,92904,92905,92906,92907,92908))"
}
},
{
"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": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.64",
"eval_cost": "1.06",
"prefix_cost": "125.45",
"data_read_per_join": "169"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83090 |
7186M |
|
| 83945 |
7186M |
|
| 84097 |
7186M |
|
| 84237 |
7157M,7341,7342,7343 |
|
| 85542 |
7219M,7313,7338 |
|
| 85543 |
7219M,7313,7338 |
|
| 85544 |
7219M,7313,7338 |
|
| 85545 |
7157M,7341,7342,7343 |
|
| 85547 |
7219M,7313,7338 |
|
| 85548 |
7157M,7341,7342,7343 |
|
| 85552 |
7184,7221M |
0 |
| 85553 |
7157M,7341,7342,7343 |
|
| 85554 |
7219M,7313,7338 |
|
| 85555 |
7157M,7341,7342,7343 |
|
| 85556 |
7219M,7313,7338 |
|
| 85557 |
7219M,7313,7338 |
|
| 85558 |
7219M,7313,7338 |
|
| 85559 |
7157M,7341,7342,7343 |
|
| 85560 |
7157M,7341,7342,7343 |
|
| 85561 |
7157M,7341,7342,7343 |
|
| 85562 |
7219M,7313,7338 |
|
| 85564 |
7157M,7341,7342,7343 |
|
| 85568 |
7219M,7313,7338 |
|
| 85569 |
7157M,7341,7342,7343 |
|
| 85570 |
7219M,7313,7338 |
|
| 85571 |
7157M,7341,7342,7343 |
|
| 85573 |
7157M,7341,7342,7343 |
|
| 85574 |
7157M,7341,7342,7343 |
|
| 85575 |
7157M,7341,7342,7343 |
|
| 85576 |
7157M,7341,7342,7343 |
|
| 85577 |
7157M,7341,7342,7343 |
|
| 85584 |
7157M,7341,7342,7343 |
|
| 85587 |
7219M,7313,7338 |
|
| 85588 |
7219M,7313,7338 |
|
| 85589 |
7219M,7313,7338 |
|
| 85591 |
7219M,7313,7338 |
|
| 85592 |
7157M,7341,7342,7343 |
|
| 85593 |
7219M,7313,7338 |
|
| 85594 |
7157M,7341,7342,7343 |
|
| 85597 |
7219M,7313,7338 |
|
| 85600 |
7219M,7313,7338 |
|
| 85601 |
7219M,7313,7338 |
|
| 85602 |
7219M,7313,7338 |
|
| 85603 |
7219M,7313,7338 |
|
| 85604 |
7219M,7313,7338 |
|
| 85868 |
7184,7221M |
0 |
| 85870 |
7184,7221M |
0 |
| 85871 |
7184,7221M |
0 |
| 86386 |
7184,7187M |
0 |
| 86889 |
7157M,7341,7342,7343 |
|
| 86891 |
7157M,7341,7342,7343 |
|
| 86893 |
7157M,7341,7342,7343 |
|
| 87888 |
7157M,7341,7342,7343 |
|
| 89529 |
7184,7221M |
0 |
| 89598 |
7184,7221M |
0 |
| 89600 |
7184,7221M |
0 |
| 89601 |
7184,7221M |
0 |
| 90025 |
7157M,7341,7342,7343 |
|
| 90068 |
7186M |
|
| 90310 |
7184,7221M |
0 |
| 90755 |
7219M,7313,7338 |
|
| 91868 |
7157M,7341,7342,7343 |
|
| 91876 |
7157M,7341,7342,7343 |
|
| 91877 |
7157M,7341,7342,7343 |
|
| 91878 |
7157M,7341,7342,7343 |
|
| 91879 |
7157M,7341,7342,7343 |
|
| 91880 |
7157M,7341,7342,7343 |
|
| 91881 |
7157M,7341,7342,7343 |
|
| 91882 |
7157M,7341,7342,7343 |
|
| 91883 |
7157M,7341,7342,7343 |
|
| 92002 |
7184M,7187 |
0 |
| 92090 |
7184M,7187 |
0 |
| 92185 |
7157M,7341,7342,7343 |
|
| 92210 |
7157M,7341,7342,7343 |
|
| 92227 |
7157M,7341,7342,7343 |
|
| 92239 |
7219M,7313,7338 |
|
| 92475 |
7219M,7313,7338 |
|
| 92480 |
7219M,7313,7338 |
|
| 92481 |
7219M,7313,7338 |
|
| 92482 |
7219M,7313,7338 |
|
| 92838 |
7186M |
|
| 92839 |
7185M |
|
| 92895 |
7186M |
|
| 92896 |
7186M |
|
| 92897 |
7185M |
|
| 92898 |
7185M |
|
| 92899 |
7186M |
|
| 92900 |
7185M |
|
| 92901 |
7186M |
|
| 92902 |
7186M |
|
| 92903 |
7185M |
|
| 92904 |
7185M |
|
| 92905 |
7186M |
|
| 92906 |
7186M |
|
| 92907 |
7185M |
|
| 92908 |
7185M |
|