Query time 0.00062
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.52"
},
"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": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.08",
"eval_cost": "4.80",
"prefix_cost": "9.88",
"data_read_per_join": "768"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (93470,93471,93472,93473,93474,93475,93476,93477,93478,93479,93480,93481,93482,93483,93484,93485,93486,93487,93488,93489,93490,93491,93492,93493,93494,93495,93496,93497,93498,93499,93500,93501,93502,93503,93504,93505,93506,93507,93508,93509,93510,93511,93512,93513,93514,93533,93534,93535))"
}
},
{
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "0.24",
"prefix_cost": "26.68",
"data_read_per_join": "6K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.60",
"eval_cost": "0.24",
"prefix_cost": "27.52",
"data_read_per_join": "38"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 93470 |
7192M |
0 |
| 93471 |
7192M |
0 |
| 93472 |
7192M |
0 |
| 93473 |
7192M |
0 |
| 93474 |
7192M |
0 |
| 93475 |
7192M |
0 |
| 93476 |
7192M |
0 |
| 93477 |
7192M |
0 |
| 93478 |
7192M |
0 |
| 93479 |
7192M |
0 |
| 93480 |
7192M |
0 |
| 93481 |
7192M |
0 |
| 93482 |
7192M |
0 |
| 93483 |
7192M |
0 |
| 93484 |
7192M |
0 |
| 93485 |
7192M |
0 |
| 93486 |
7192M |
0 |
| 93487 |
7192M |
0 |
| 93488 |
7192M |
0 |
| 93489 |
7192M |
0 |
| 93490 |
7192M |
0 |
| 93491 |
7192M |
0 |
| 93492 |
7192M |
0 |
| 93493 |
7192M |
0 |
| 93494 |
7192M |
0 |
| 93495 |
7192M |
0 |
| 93496 |
7192M |
0 |
| 93497 |
7192M |
0 |
| 93498 |
7192M |
0 |
| 93499 |
7192M |
0 |
| 93500 |
7192M |
0 |
| 93501 |
7192M |
0 |
| 93502 |
7192M |
0 |
| 93503 |
7192M |
0 |
| 93504 |
7192M |
0 |
| 93505 |
7192M |
0 |
| 93506 |
7192M |
0 |
| 93507 |
7192M |
0 |
| 93508 |
7192M |
0 |
| 93509 |
7192M |
0 |
| 93510 |
7192M |
0 |
| 93511 |
7192M |
0 |
| 93512 |
7192M |
0 |
| 93513 |
7192M |
0 |
| 93514 |
7192M |
0 |
| 93533 |
7192M |
0 |
| 93534 |
7192M |
0 |
| 93535 |
7192M |
0 |