Query time 0.00240
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.77"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 96,
"rows_produced_per_join": 96,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.89",
"eval_cost": "9.60",
"prefix_cost": "19.49",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (101209,101210,101211,101212,101213,101214,101215,101216,101217,101218,101219,101220,101221,101222,101223,101224,101225,101226,101227,101228,101229,101230,101231,101232,101233,101234,101235,101236,101237,101238,101239,101240,101241,101242,101243,101244,101245,101246,101247,101248,101249,101250,101251,101252,101253,101254,101255,101256,101257,101258,101259,101260,101261,101262,101263,101264,101265,101266,101267,101268,101269,101270,101271,101272,101273,101274,101275,101276,101277,101278,101279,101280,101281,101282,101283,101284,101285,101286,101287,101288,101289,101290,101291,101292,101293,101294,101295,101296,101297,101298,101299,101300,101301,101302,101303,101304))"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "0.48",
"prefix_cost": "53.09",
"data_read_per_join": "12K"
},
"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": "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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.20",
"eval_cost": "0.48",
"prefix_cost": "54.77",
"data_read_per_join": "76"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 101209 |
7200M |
0 |
| 101210 |
7200M |
0 |
| 101211 |
7200M |
0 |
| 101212 |
7200M |
0 |
| 101213 |
7200M |
0 |
| 101214 |
7200M |
0 |
| 101215 |
7200M |
0 |
| 101216 |
7200M |
0 |
| 101217 |
7200M |
0 |
| 101218 |
7200M |
0 |
| 101219 |
7200M |
0 |
| 101220 |
7200M |
0 |
| 101221 |
7200M |
0 |
| 101222 |
7200M |
0 |
| 101223 |
7200M |
0 |
| 101224 |
7200M |
0 |
| 101225 |
7200M |
0 |
| 101226 |
7200M |
0 |
| 101227 |
7200M |
0 |
| 101228 |
7200M |
0 |
| 101229 |
7200M |
0 |
| 101230 |
7200M |
0 |
| 101231 |
7200M |
0 |
| 101232 |
7200M |
0 |
| 101233 |
7200M |
0 |
| 101234 |
7200M |
0 |
| 101235 |
7200M |
0 |
| 101236 |
7200M |
0 |
| 101237 |
7200M |
0 |
| 101238 |
7200M |
0 |
| 101239 |
7200M |
0 |
| 101240 |
7200M |
0 |
| 101241 |
7200M |
0 |
| 101242 |
7200M |
0 |
| 101243 |
7200M |
0 |
| 101244 |
7200M |
0 |
| 101245 |
7200M |
0 |
| 101246 |
7200M |
0 |
| 101247 |
7200M |
0 |
| 101248 |
7200M |
0 |
| 101249 |
7200M |
0 |
| 101250 |
7200M |
0 |
| 101251 |
7200M |
0 |
| 101252 |
7200M |
0 |
| 101253 |
7200M |
0 |
| 101254 |
7200M |
0 |
| 101255 |
7200M |
0 |
| 101256 |
7200M |
0 |
| 101257 |
7200M |
0 |
| 101258 |
7200M |
0 |
| 101259 |
7200M |
0 |
| 101260 |
7200M |
0 |
| 101261 |
7200M |
0 |
| 101262 |
7200M |
0 |
| 101263 |
7200M |
0 |
| 101264 |
7200M |
0 |
| 101265 |
7200M |
0 |
| 101266 |
7200M |
0 |
| 101267 |
7200M |
0 |
| 101268 |
7200M |
0 |
| 101269 |
7200M |
0 |
| 101270 |
7200M |
0 |
| 101271 |
7200M |
0 |
| 101272 |
7200M |
0 |
| 101273 |
7200M |
0 |
| 101274 |
7200M |
0 |
| 101275 |
7200M |
0 |
| 101276 |
7200M |
0 |
| 101277 |
7200M |
0 |
| 101278 |
7200M |
0 |
| 101279 |
7200M |
0 |
| 101280 |
7200M |
0 |
| 101281 |
7200M |
0 |
| 101282 |
7200M |
0 |
| 101283 |
7200M |
0 |
| 101284 |
7200M |
0 |
| 101285 |
7200M |
0 |
| 101286 |
7200M |
0 |
| 101287 |
7200M |
0 |
| 101288 |
7200M |
0 |
| 101289 |
7200M |
0 |
| 101290 |
7200M |
0 |
| 101291 |
7200M |
0 |
| 101292 |
7200M |
0 |
| 101293 |
7200M |
0 |
| 101294 |
7200M |
0 |
| 101295 |
7200M |
0 |
| 101296 |
7200M |
0 |
| 101297 |
7200M |
0 |
| 101298 |
7200M |
0 |
| 101299 |
7200M |
0 |
| 101300 |
7200M |
0 |
| 101301 |
7200M |
0 |
| 101302 |
7200M |
0 |
| 101303 |
7200M |
0 |
| 101304 |
7200M |
0 |