Query time 0.01776
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "136.50"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "10.92"
},
"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.12",
"cost_info": {
"read_cost": "2.33",
"eval_cost": "1.09",
"prefix_cost": "121.75",
"data_read_per_join": "174"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (85673,85693,85705,85717,87551,88404,88658,88700,88705,88747,87448,87460,88492,88500,89453,89466,89474,89482,91434,91442,91448,91456,84764,85659,85681,89019,89104,89112,88752,88794,88795,87504,87520,88444,88462,88478,89458,85728,85745,85755,85765,90831,88553,89976,89977,89978,87463,87550,88497,91453,85735,84704,84707,91054,88669,88716,84773,84786,84795,89979,89980,89981,88191,88199,88203,88211,84777,87536,88399,88551,88066,88196,88208,88509,88513,88950,88951,88952,88498,88657,88698,88699,88704,88745,88746,91440,91454,85725,85742,85752,85762,88559,85732,88493,91435,91449))"
}
},
{
"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.73",
"eval_cost": "1.09",
"prefix_cost": "125.57",
"data_read_per_join": "174"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 84704 |
7208M,7241,7309,7346 |
|
| 84707 |
7208M,7241,7309,7346 |
|
| 84764 |
7210,7211,7212M |
0 |
| 84773 |
7210,7211,7214M |
0 |
| 84777 |
7210,7211,7214M |
0 |
| 84786 |
7210,7211,7214M |
0 |
| 84795 |
7210,7211,7214M |
0 |
| 85659 |
7210,7211,7212M |
0 |
| 85673 |
7210,7211,7214M |
0 |
| 85681 |
7210,7211,7214M |
0 |
| 85693 |
7210,7211,7214M |
0 |
| 85705 |
7210,7211,7214M |
0 |
| 85717 |
7210,7211,7214M |
0 |
| 85725 |
7210,7211,7214M |
0 |
| 85728 |
7210,7211,7214M |
0 |
| 85732 |
7210,7211,7214M |
0 |
| 85735 |
7210,7211,7214M |
0 |
| 85742 |
7210,7211,7214M |
0 |
| 85745 |
7210,7211,7214M |
0 |
| 85752 |
7210,7211,7214M |
0 |
| 85755 |
7210,7211,7214M |
0 |
| 85762 |
7210,7211,7214M |
0 |
| 85765 |
7210,7211,7214M |
0 |
| 87448 |
7210,7211,7212M |
0 |
| 87460 |
7210,7211,7214M |
0 |
| 87463 |
7210,7211,7214M |
0 |
| 87504 |
7210,7211,7212M |
0 |
| 87520 |
7210,7211,7212M |
0 |
| 87536 |
7210,7211,7212M |
0 |
| 87550 |
7210,7211,7214M |
0 |
| 87551 |
7210,7211,7214M |
0 |
| 88066 |
7259M,7345,7347 |
|
| 88191 |
7210,7211,7212M |
0 |
| 88196 |
7210,7211,7214M |
0 |
| 88199 |
7210,7211,7214M |
0 |
| 88203 |
7210,7211,7212M |
0 |
| 88208 |
7210,7211,7214M |
0 |
| 88211 |
7210,7211,7214M |
0 |
| 88399 |
7210,7211,7212M |
0 |
| 88404 |
7210,7211,7214M |
0 |
| 88444 |
7210,7211,7212M |
0 |
| 88462 |
7210,7211,7212M |
0 |
| 88478 |
7210,7211,7212M |
0 |
| 88492 |
7210,7211,7212M |
0 |
| 88493 |
7210,7211,7212M |
0 |
| 88497 |
7210,7211,7214M |
0 |
| 88498 |
7210,7211,7214M |
0 |
| 88500 |
7210,7211,7214M |
0 |
| 88509 |
7208M,7241,7309,7346 |
|
| 88513 |
7208M,7241,7309,7346 |
|
| 88551 |
7210,7211,7282M |
0 |
| 88553 |
7210,7211,7282M |
0 |
| 88559 |
7210,7211,7282M |
0 |
| 88657 |
7210,7211,7282M |
0 |
| 88658 |
7210,7211,7282M |
0 |
| 88669 |
7210,7211,7282M |
0 |
| 88698 |
7210,7211,7282M |
0 |
| 88699 |
7210,7211,7282M |
0 |
| 88700 |
7210,7211,7282M |
0 |
| 88704 |
7210,7211,7282M |
0 |
| 88705 |
7210,7211,7282M |
0 |
| 88716 |
7210,7211,7282M |
0 |
| 88745 |
7210,7211,7282M |
0 |
| 88746 |
7210,7211,7282M |
0 |
| 88747 |
7210,7211,7282M |
0 |
| 88752 |
7210,7211,7282M |
0 |
| 88794 |
7210,7211,7282M |
0 |
| 88795 |
7210,7211,7282M |
0 |
| 88950 |
7208M,7241,7309,7346 |
|
| 88951 |
7208M,7241,7309,7346 |
|
| 88952 |
7208M,7241,7309,7346 |
|
| 89019 |
7210,7211,7212M |
0 |
| 89104 |
7210,7211,7212M |
0 |
| 89112 |
7210,7211,7212M |
0 |
| 89453 |
7210,7211,7214M |
0 |
| 89458 |
7210,7211,7214M |
0 |
| 89466 |
7210,7211,7214M |
0 |
| 89474 |
7210,7211,7214M |
0 |
| 89482 |
7210,7211,7214M |
0 |
| 89976 |
7260M,7320 |
|
| 89977 |
7260M,7320 |
|
| 89978 |
7260M,7320 |
|
| 89979 |
7260M,7320 |
|
| 89980 |
7260M,7320 |
|
| 89981 |
7260M,7320 |
|
| 90831 |
7210,7211,7212M |
0 |
| 91054 |
7208M,7241,7309,7346 |
|
| 91434 |
7210M,7211 |
0 |
| 91435 |
7210M,7211 |
0 |
| 91440 |
7210M,7211 |
0 |
| 91442 |
7210M,7211 |
0 |
| 91448 |
7210M,7211 |
0 |
| 91449 |
7210M,7211 |
0 |
| 91453 |
7210M,7211 |
0 |
| 91454 |
7210M,7211 |
0 |
| 91456 |
7210M,7211 |
0 |