Query time 0.00201
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "53.64"
},
"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": 94,
"rows_produced_per_join": 94,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.69",
"eval_cost": "9.40",
"prefix_cost": "19.09",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (100963,100964,100965,100966,100967,100968,100969,100970,100985,100986,100987,100989,100990,100991,100992,100993,100994,100995,100996,100997,100998,100999,101000,101001,101002,101003,101004,101005,101006,101007,101008,101009,101010,101093,101094,101095,101096,101097,101098,101099,101100,101101,101958,101959,101960,101961,101962))"
}
},
{
"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": "23.50",
"eval_cost": "0.47",
"prefix_cost": "51.99",
"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.18",
"eval_cost": "0.47",
"prefix_cost": "53.64",
"data_read_per_join": "75"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 100963 |
7319,7193M |
0 |
| 100964 |
7319,7193M |
0 |
| 100965 |
7319,7193M |
0 |
| 100966 |
7319,7193M |
0 |
| 100967 |
7319,7193M |
0 |
| 100968 |
7319,7193M |
0 |
| 100969 |
7319,7193M |
0 |
| 100970 |
7319,7193M |
0 |
| 100985 |
7319,7193M |
0 |
| 100986 |
7319,7193M |
0 |
| 100987 |
7319,7193M |
0 |
| 100989 |
7319,7193M |
0 |
| 100990 |
7319,7193M |
0 |
| 100991 |
7319,7193M |
0 |
| 100992 |
7319,7193M |
0 |
| 100993 |
7319,7193M |
0 |
| 100994 |
7319,7193M |
0 |
| 100995 |
7319,7193M |
0 |
| 100996 |
7319,7193M |
0 |
| 100997 |
7319,7193M |
0 |
| 100998 |
7319,7193M |
0 |
| 100999 |
7319,7193M |
0 |
| 101000 |
7319,7193M |
0 |
| 101001 |
7319,7193M |
0 |
| 101002 |
7319,7193M |
0 |
| 101003 |
7319,7193M |
0 |
| 101004 |
7319,7193M |
0 |
| 101005 |
7319,7193M |
0 |
| 101006 |
7319,7193M |
0 |
| 101007 |
7319,7193M |
0 |
| 101008 |
7319,7193M |
0 |
| 101009 |
7319,7193M |
0 |
| 101010 |
7319,7193M |
0 |
| 101093 |
7319,7193M |
0 |
| 101094 |
7319,7193M |
0 |
| 101095 |
7319,7193M |
0 |
| 101096 |
7319,7193M |
0 |
| 101097 |
7319,7193M |
0 |
| 101098 |
7319,7193M |
0 |
| 101099 |
7319,7193M |
0 |
| 101100 |
7319,7193M |
0 |
| 101101 |
7319,7193M |
0 |
| 101958 |
7319,7193M |
0 |
| 101959 |
7319,7193M |
0 |
| 101960 |
7319,7193M |
0 |
| 101961 |
7319,7193M |
0 |
| 101962 |
7319,7193M |
0 |