Query time 0.00288
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "861.87"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "12.62"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 125,
"rows_produced_per_join": 5,
"filtered": "4.00",
"cost_info": {
"read_cost": "28.14",
"eval_cost": "1.00",
"prefix_cost": "29.14",
"data_read_per_join": "13K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`ea201_francemaqu`.`cscart_categories`.`storefront_id` in (0,1)) and ((`ea201_francemaqu`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`ea201_francemaqu`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`ea201_francemaqu`.`cscart_categories`.`usergroup_ids`)) and (`ea201_francemaqu`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"ea201_francemaqu.cscart_categories.category_id"
],
"rows_examined_per_scan": 136,
"rows_produced_per_join": 12,
"filtered": "1.86",
"index_condition": "(`ea201_francemaqu`.`cscart_products_categories`.`product_id` in (10975,5759,1925,11317,10974,11013,11023,11027,11315,11314,11313,11312,11036,11073,11089,11309,11302,10884,11300,11256,11257,11316,10830,11286,11285,11284,11283,3875,11282,10638,10870,11031,11030,10738,11253,11025,11267,11266,11265,11264,11263,11262,11259,11261,10848,10979,11012,11024,11090,11234,11235,11258,11254,11269,10333,11015,11018,11019,11238,11251,11307,11308,11002,10335))",
"cost_info": {
"read_cost": "684.10",
"eval_cost": "2.52",
"prefix_cost": "849.24",
"data_read_per_join": "201"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
}
]
}
}
}
Result
product_id |
category_ids |
1925 |
87,88M |
3875 |
16,116,28M,2,14 |
5759 |
14M,87,88 |
10333 |
110M,116 |
10335 |
116,21M |
10638 |
112,32,492,118M,116,114 |
10738 |
116,13M,9 |
10830 |
120M,9,474 |
10848 |
20M,5,116,492,27 |
10870 |
30,5,94M,116,492 |
10884 |
14,116,28M |
10974 |
2,14,116,28M |
10975 |
110M,116 |
10979 |
492,2M,449,50,116 |
11002 |
116,492,112M,9,32,10 |
11012 |
116,2,492,16,50M,8 |
11013 |
122M,116,14,492 |
11015 |
28M,493,116,14 |
11018 |
493,9,116,10M |
11019 |
19M,5,2,493,16,46,116 |
11023 |
116,10M,13,492,9 |
11024 |
9,116,10M,13,492 |
11025 |
9,116,10,13M,492 |
11027 |
111M,492,449,116,2,32,50 |
11030 |
114,119,492,112,116,451M |
11031 |
451M,114,119,492,112,116 |
11036 |
9,10M,492,116 |
11073 |
116,28M,492,14 |
11089 |
154M,116,119,492 |
11090 |
492,154M,116,119 |
11234 |
17,116,25M |
11235 |
17,116,25M |
11238 |
9,13M,116 |
11251 |
116,110M |
11253 |
13M,116,9,493 |
11254 |
34M,23,24 |
11256 |
19M,116,5,46 |
11257 |
28,116,14M |
11258 |
492,116,118M |
11259 |
10M,9,116 |
11261 |
116,25M,17 |
11262 |
13M,116,493,9 |
11263 |
9,116,112,10,32M |
11264 |
10,32,9M,116,112 |
11265 |
492,154M,116,5 |
11266 |
25M,17,116 |
11267 |
25M,17,116 |
11269 |
35M |
11282 |
116,34,23M |
11283 |
116,34,23M |
11284 |
116,34,23M |
11285 |
116,34,23M |
11286 |
112,451M,114,492,116,119 |
11300 |
493,10,9M,116 |
11302 |
116,13,9M |
11307 |
52M,154 |
11308 |
54,52M,117 |
11309 |
13,9M |
11312 |
492,154M |
11313 |
116,110,9M,494 |
11314 |
46,27,494,116,5M |
11315 |
116,117M |
11316 |
33M,11 |
11317 |
9M,13 |