Query time 0.00231
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "34.90"
},
"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": 61,
"rows_produced_per_join": 61,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.38",
"eval_cost": "6.10",
"prefix_cost": "12.48",
"data_read_per_join": "976"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (99000,99001,99002,99003,99004,99005,99006,99007,99008,99009,99010,99011,99333,99334,99335,99336,99337,99338,99339,99340,99341,99342,99343,99491,99492,99493,99494,99495,99496,99497,99498,99499,99500,99501,99502,99503,99504,99505,99506,100399,100479,100501,100502,100853,100854,100855,100863,100864,100865,100866,100871,100872,100873,100874,100875,100876,101054,101656,101657,101658,101659))"
}
},
{
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "15.25",
"eval_cost": "0.31",
"prefix_cost": "33.83",
"data_read_per_join": "7K"
},
"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": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.76",
"eval_cost": "0.31",
"prefix_cost": "34.90",
"data_read_per_join": "48"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 99000 |
7194M |
0 |
| 99001 |
7194M |
0 |
| 99002 |
7194M |
0 |
| 99003 |
7194M |
0 |
| 99004 |
7194M |
0 |
| 99005 |
7194M |
0 |
| 99006 |
7194M |
0 |
| 99007 |
7194M |
0 |
| 99008 |
7194M |
0 |
| 99009 |
7194M |
0 |
| 99010 |
7194M |
0 |
| 99011 |
7194M |
0 |
| 99333 |
7194M |
0 |
| 99334 |
7194M |
0 |
| 99335 |
7194M |
0 |
| 99336 |
7194M |
0 |
| 99337 |
7194M |
0 |
| 99338 |
7194M |
0 |
| 99339 |
7194M |
0 |
| 99340 |
7194M |
0 |
| 99341 |
7194M |
0 |
| 99342 |
7194M |
0 |
| 99343 |
7194M |
0 |
| 99491 |
7194M |
0 |
| 99492 |
7194M |
0 |
| 99493 |
7194M |
0 |
| 99494 |
7194M |
0 |
| 99495 |
7194M |
0 |
| 99496 |
7194M |
0 |
| 99497 |
7194M |
0 |
| 99498 |
7194M |
0 |
| 99499 |
7194M |
0 |
| 99500 |
7194M |
0 |
| 99501 |
7194M |
0 |
| 99502 |
7194M |
0 |
| 99503 |
7194M |
0 |
| 99504 |
7194M |
0 |
| 99505 |
7194M |
0 |
| 99506 |
7194M |
0 |
| 100399 |
7194M |
0 |
| 100479 |
7194M |
0 |
| 100501 |
7194M |
0 |
| 100502 |
7194M |
0 |
| 100853 |
7194M |
0 |
| 100854 |
7194M |
0 |
| 100855 |
7194M |
0 |
| 100863 |
7194M |
0 |
| 100864 |
7194M |
0 |
| 100865 |
7194M |
0 |
| 100866 |
7194M |
0 |
| 100871 |
7194M |
0 |
| 100872 |
7194M |
0 |
| 100873 |
7194M |
0 |
| 100874 |
7194M |
0 |
| 100875 |
7194M |
0 |
| 100876 |
7194M |
0 |
| 101054 |
7194M |
0 |
| 101656 |
7194M |
0 |
| 101657 |
7194M |
0 |
| 101658 |
7194M |
0 |
| 101659 |
7194M |
0 |