Query time 0.00292
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 |
88M,87 |
3875 |
2,14,16,116,28M |
5759 |
88,14M,87 |
10333 |
110M,116 |
10335 |
116,21M |
10638 |
116,114,112,32,492,118M |
10738 |
116,13M,9 |
10830 |
120M,9,474 |
10848 |
492,27,20M,5,116 |
10870 |
492,30,5,94M,116 |
10884 |
28M,14,116 |
10974 |
28M,2,14,116 |
10975 |
116,110M |
10979 |
116,492,2M,449,50 |
11002 |
10,116,492,112M,9,32 |
11012 |
8,116,2,492,16,50M |
11013 |
122M,116,14,492 |
11015 |
28M,493,116,14 |
11018 |
9,116,10M,493 |
11019 |
46,116,19M,5,2,493,16 |
11023 |
9,116,10M,13,492 |
11024 |
492,9,116,10M,13 |
11025 |
13M,492,9,116,10 |
11027 |
32,50,111M,492,449,116,2 |
11030 |
451M,114,119,492,112,116 |
11031 |
116,451M,114,119,492,112 |
11036 |
116,9,10M,492 |
11073 |
492,14,116,28M |
11089 |
492,154M,116,119 |
11090 |
492,154M,116,119 |
11234 |
25M,17,116 |
11235 |
116,25M,17 |
11238 |
13M,116,9 |
11251 |
116,110M |
11253 |
493,13M,116,9 |
11254 |
34M,23,24 |
11256 |
46,19M,116,5 |
11257 |
14M,28,116 |
11258 |
116,118M,492 |
11259 |
10M,9,116 |
11261 |
116,25M,17 |
11262 |
493,9,13M,116 |
11263 |
112,10,32M,9,116 |
11264 |
112,10,32,9M,116 |
11265 |
5,492,154M,116 |
11266 |
116,25M,17 |
11267 |
116,25M,17 |
11269 |
35M |
11282 |
116,34,23M |
11283 |
116,34,23M |
11284 |
34,23M,116 |
11285 |
34,23M,116 |
11286 |
116,119,112,451M,114,492 |
11300 |
116,493,10,9M |
11302 |
116,13,9M |
11307 |
52M,154 |
11308 |
52M,117,54 |
11309 |
9M,13 |
11312 |
492,154M |
11313 |
110,9M,494,116 |
11314 |
5M,46,27,494,116 |
11315 |
117M,116 |
11316 |
11,33M |
11317 |
9M,13 |