Query time 0.00133
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "41.14"
},
"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": 72,
"rows_produced_per_join": 72,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.49",
"eval_cost": "7.20",
"prefix_cost": "14.69",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92500,86278,86279,82385,82362,84696,88938,84699,88516,88519,88949,92000,85039,92424,92425,92426,92427,92428,92429,92431,88940,84251,84256,87580,87595,87610,88791,87370,89609,89610))"
}
},
{
"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": "18.00",
"eval_cost": "0.36",
"prefix_cost": "39.89",
"data_read_per_join": "9K"
},
"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.90",
"eval_cost": "0.36",
"prefix_cost": "41.15",
"data_read_per_join": "57"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82362 |
7301,7151M |
|
| 82385 |
7305,7160M |
|
| 84251 |
7194M |
|
| 84256 |
7194M |
|
| 84696 |
7241,7309,7346,7208M |
|
| 84699 |
7241,7309,7346,7208M |
|
| 85039 |
7341,7342,7343,7157M |
|
| 86278 |
7148,7163,7164M |
0 |
| 86279 |
7148,7163,7164M |
0 |
| 87370 |
7341,7342,7343,7157M |
|
| 87580 |
7194M |
|
| 87595 |
7194M |
|
| 87610 |
7194M |
|
| 88516 |
7241,7309,7346,7208M |
|
| 88519 |
7241,7309,7346,7208M |
|
| 88791 |
7194M |
|
| 88938 |
7241,7309,7346,7208M |
|
| 88940 |
7241,7309,7346,7208M |
|
| 88949 |
7148,7207,7208M |
0 |
| 89609 |
7341,7342,7343,7157M |
|
| 89610 |
7341,7342,7343,7157M |
|
| 92000 |
7226,7225M |
|
| 92424 |
7263M |
|
| 92425 |
7263M |
|
| 92426 |
7263M |
|
| 92427 |
7263M |
|
| 92428 |
7263M |
|
| 92429 |
7263M |
|
| 92431 |
7263M |
|
| 92500 |
7341,7342,7343,7157M |
|