Query time 0.01666
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "129.47"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "5.72"
},
"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": 5,
"filtered": "0.58",
"cost_info": {
"read_cost": "2.33",
"eval_cost": "0.57",
"prefix_cost": "121.75",
"data_read_per_join": "91"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88304,88305,89712,89713,88302,88303,89708,89709,89710,89711,88300,88301,89706,89707,89701,89702,88296,88297,89699,89700,88381,88382,88377,88378,88379,88380,88375,88376,88370,88371,88368,88369,94387,94396,94397,94399,94400,94423,94424,94858,94859,94867,94868,94870,94871,94896,94897,94906,94907,94916,94917,94919,94920,94945,94946,96250,96251,96260,96261,96263,96264,96290,96291,96576,96581,96598,96599,100550,100559,100560,100562,100563,100589,100590,101579,101580,101589,101590,101592,101593,101619,101620,101624))"
}
},
{
"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": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.43",
"eval_cost": "0.57",
"prefix_cost": "123.75",
"data_read_per_join": "91"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 88296 |
7237,7272,7273M |
0 |
| 88297 |
7237,7272,7273M |
0 |
| 88300 |
7237,7272,7273M |
0 |
| 88301 |
7237,7272,7273M |
0 |
| 88302 |
7237,7272,7273M |
0 |
| 88303 |
7237,7272,7273M |
0 |
| 88304 |
7237,7272,7273M |
0 |
| 88305 |
7237,7272,7273M |
0 |
| 88368 |
7237,7272,7281M |
0 |
| 88369 |
7237,7272,7281M |
0 |
| 88370 |
7237,7272,7281M |
0 |
| 88371 |
7237,7272,7281M |
0 |
| 88375 |
7237,7272,7281M |
0 |
| 88376 |
7237,7272,7281M |
0 |
| 88377 |
7237,7272,7281M |
0 |
| 88378 |
7237,7272,7281M |
0 |
| 88379 |
7237,7272,7281M |
0 |
| 88380 |
7237,7272,7281M |
0 |
| 88381 |
7237,7272,7281M |
0 |
| 88382 |
7237,7272,7281M |
0 |
| 89699 |
7237,7272,7296M |
0 |
| 89700 |
7237,7272,7296M |
0 |
| 89701 |
7237,7272,7296M |
0 |
| 89702 |
7237,7272,7296M |
0 |
| 89706 |
7237,7272,7296M |
0 |
| 89707 |
7237,7272,7296M |
0 |
| 89708 |
7237,7272,7296M |
0 |
| 89709 |
7237,7272,7296M |
0 |
| 89710 |
7237,7272,7296M |
0 |
| 89711 |
7237,7272,7296M |
0 |
| 89712 |
7237,7272,7296M |
0 |
| 89713 |
7237,7272,7296M |
0 |
| 94387 |
7272M |
0 |
| 94396 |
7272M |
0 |
| 94397 |
7272M |
0 |
| 94399 |
7272M |
0 |
| 94400 |
7272M |
0 |
| 94423 |
7272M |
0 |
| 94424 |
7272M |
0 |
| 94858 |
7272M |
0 |
| 94859 |
7272M |
0 |
| 94867 |
7272M |
0 |
| 94868 |
7272M |
0 |
| 94870 |
7272M |
0 |
| 94871 |
7272M |
0 |
| 94896 |
7272M |
0 |
| 94897 |
7272M |
0 |
| 94906 |
7272M |
0 |
| 94907 |
7272M |
0 |
| 94916 |
7272M |
0 |
| 94917 |
7272M |
0 |
| 94919 |
7272M |
0 |
| 94920 |
7272M |
0 |
| 94945 |
7272M |
0 |
| 94946 |
7272M |
0 |
| 96250 |
7272M |
0 |
| 96251 |
7272M |
0 |
| 96260 |
7272M |
0 |
| 96261 |
7272M |
0 |
| 96263 |
7272M |
0 |
| 96264 |
7272M |
0 |
| 96290 |
7272M |
0 |
| 96291 |
7272M |
0 |
| 96576 |
7272M |
0 |
| 96581 |
7272M |
0 |
| 96598 |
7272M |
0 |
| 96599 |
7272M |
0 |
| 100550 |
7272M |
0 |
| 100559 |
7272M |
0 |
| 100560 |
7272M |
0 |
| 100562 |
7272M |
0 |
| 100563 |
7272M |
0 |
| 100589 |
7272M |
0 |
| 100590 |
7272M |
0 |
| 101579 |
7272M |
0 |
| 101580 |
7272M |
0 |
| 101589 |
7272M |
0 |
| 101590 |
7272M |
0 |
| 101592 |
7272M |
0 |
| 101593 |
7272M |
0 |
| 101619 |
7272M |
0 |
| 101620 |
7272M |
0 |
| 101624 |
7272M |
0 |