Query time 0.02680
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "133.93"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "9.02"
},
"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": "0.92",
"cost_info": {
"read_cost": "2.33",
"eval_cost": "0.90",
"prefix_cost": "121.75",
"data_read_per_join": "144"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88056,88057,88058,87998,88000,88037,90329,90330,90331,90333,90334,90337,90338,90339,90340,90341,90342,90345,90346,90347,90348,87881,88031,87948,88059,88060,88702,88749,89985,87945,89986,88041,86860,87940,87942,87964,90328,90332,90335,90336,90343,90344,88029,88018,88021,88799,88006,88013,88015,87972,88091,88055,88085,88703,88750,87809,87811,87814,87817,87824,90327,88071,88076,88090,87944,88595,88072,88154,87808,87810,87813,87816,87823,87874,87779,87783,87793,87799,87880,87873,90317,90319,90320,88087,88797,87960,87778,87782,87791,87797,87760,88701,88748,88596,88030,88086))"
}
},
{
"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": "124.91",
"data_read_per_join": "144"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 86860 |
7210,7307,7308M |
0 |
| 87760 |
7210,7307,7308M |
0 |
| 87778 |
7210,7307,7308M |
0 |
| 87779 |
7210,7307,7308M |
0 |
| 87782 |
7210,7211,7321M |
0 |
| 87783 |
7210,7211,7321M |
0 |
| 87791 |
7210,7307,7308M |
0 |
| 87793 |
7210,7307,7308M |
0 |
| 87797 |
7210,7307,7308M |
0 |
| 87799 |
7210,7307,7308M |
0 |
| 87808 |
7210,7307,7308M |
0 |
| 87809 |
7210,7307,7308M |
0 |
| 87810 |
7210,7307,7308M |
0 |
| 87811 |
7210,7307,7308M |
0 |
| 87813 |
7210,7307,7308M |
0 |
| 87814 |
7210,7307,7308M |
0 |
| 87816 |
7210,7307,7308M |
0 |
| 87817 |
7210,7307,7308M |
0 |
| 87823 |
7210,7307,7308M |
0 |
| 87824 |
7210,7307,7308M |
0 |
| 87873 |
7208M,7241,7309,7346 |
|
| 87874 |
7208M,7241,7309,7346 |
|
| 87880 |
7208M,7241,7309,7346 |
|
| 87881 |
7208M,7241,7309,7346 |
|
| 87940 |
7256M,7262 |
|
| 87942 |
7260M,7320 |
|
| 87944 |
7260M,7320 |
|
| 87945 |
7260M,7320 |
|
| 87948 |
7259M,7345,7347 |
|
| 87960 |
7261M,7349 |
|
| 87964 |
7260M,7320 |
|
| 87972 |
7260M,7320 |
|
| 87998 |
7260M,7320 |
|
| 88000 |
7260M,7320 |
|
| 88006 |
7260M,7320 |
|
| 88013 |
7260M,7320 |
|
| 88015 |
7260M,7320 |
|
| 88018 |
7260M,7320 |
|
| 88021 |
7260M,7320 |
|
| 88029 |
7259M,7345,7347 |
|
| 88030 |
7261M,7349 |
|
| 88031 |
7260M,7320 |
|
| 88037 |
7256M,7262 |
|
| 88041 |
7261M,7349 |
|
| 88055 |
7261M,7349 |
|
| 88056 |
7256M,7262 |
|
| 88057 |
7256M,7262 |
|
| 88058 |
7256M,7262 |
|
| 88059 |
7256M,7262 |
|
| 88060 |
7256M,7262 |
|
| 88071 |
7261M,7349 |
|
| 88072 |
7261M,7349 |
|
| 88076 |
7261M,7349 |
|
| 88085 |
7261M,7349 |
|
| 88086 |
7256M,7262 |
|
| 88087 |
7256M,7262 |
|
| 88090 |
7256M,7262 |
|
| 88091 |
7256M,7262 |
|
| 88154 |
7260M,7320 |
|
| 88595 |
7210,7211,7282M |
0 |
| 88596 |
7210,7211,7282M |
0 |
| 88701 |
7210,7211,7282M |
0 |
| 88702 |
7210,7211,7282M |
0 |
| 88703 |
7210,7211,7282M |
0 |
| 88748 |
7210,7211,7282M |
0 |
| 88749 |
7210,7211,7282M |
0 |
| 88750 |
7210,7211,7282M |
0 |
| 88797 |
7210,7211,7282M |
0 |
| 88799 |
7210,7211,7282M |
0 |
| 89985 |
7261M,7349 |
|
| 89986 |
7261M,7349 |
|
| 90317 |
7247M,7265 |
|
| 90319 |
7247M,7265 |
|
| 90320 |
7247M,7265 |
|
| 90327 |
7247M,7265 |
|
| 90328 |
7247M,7265 |
|
| 90329 |
7247M,7265 |
|
| 90330 |
7247M,7265 |
|
| 90331 |
7247M,7265 |
|
| 90332 |
7247M,7265 |
|
| 90333 |
7247M,7265 |
|
| 90334 |
7247M,7265 |
|
| 90335 |
7247M,7265 |
|
| 90336 |
7247M,7265 |
|
| 90337 |
7247M,7265 |
|
| 90338 |
7247M,7265 |
|
| 90339 |
7247M,7265 |
|
| 90340 |
7247M,7265 |
|
| 90341 |
7247M,7265 |
|
| 90342 |
7247M,7265 |
|
| 90343 |
7247M,7265 |
|
| 90344 |
7247M,7265 |
|
| 90345 |
7247M,7265 |
|
| 90346 |
7247M,7265 |
|
| 90347 |
7247M,7265 |
|
| 90348 |
7247M,7265 |
|