Query time 0.00056
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "5.76"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 10,
"rows_produced_per_join": 10,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.26",
"eval_cost": "1.00",
"prefix_cost": "2.26",
"data_read_per_join": "160"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (83897,83923,91581,91627,92401))"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"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": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.50",
"eval_cost": "1.00",
"prefix_cost": "5.76",
"data_read_per_join": "26K"
},
"used_columns": [
"category_id",
"id_path"
]
}
}
]
}
}
Result
| product_id |
link_type |
id_path |
| 83897 |
M |
7197/7204/7255 |
| 83923 |
A |
7195 |
| 83923 |
A |
7195/7254 |
| 83923 |
M |
7143/7153/7290 |
| 91581 |
M |
7195/7254 |
| 91627 |
A |
7143/7153/7290 |
| 91627 |
M |
7195/7254 |
| 92401 |
A |
7148/7158 |
| 92401 |
A |
7148/7158/7159 |
| 92401 |
M |
7148 |