Query time 0.00065
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "48.53"
},
"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": 85,
"rows_produced_per_join": 85,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.79",
"eval_cost": "8.50",
"prefix_cost": "17.29",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88044,87987,90828,87632,88561,87637,90827,87938,87941,87997,88026,87764,87770,87773,87777,87781,87788,87794,87281,87289,87882,87988,88036,88047,88048,86862,90324,90326,88050,88051))"
}
},
{
"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": "21.25",
"eval_cost": "0.43",
"prefix_cost": "47.04",
"data_read_per_join": "11K"
},
"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.06",
"eval_cost": "0.43",
"prefix_cost": "48.53",
"data_read_per_join": "68"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 86862 |
7210,7307,7308M |
0 |
| 87281 |
7210,7307,7308M |
0 |
| 87289 |
7210,7307,7308M |
0 |
| 87632 |
7210,7211,7214M |
0 |
| 87637 |
7210,7211,7214M |
0 |
| 87764 |
7210,7307,7308M |
0 |
| 87770 |
7210,7307,7308M |
0 |
| 87773 |
7210,7307,7308M |
0 |
| 87777 |
7210,7307,7308M |
0 |
| 87781 |
7210,7211,7321M |
0 |
| 87788 |
7210,7307,7308M |
0 |
| 87794 |
7210,7307,7308M |
0 |
| 87882 |
7241,7309,7346,7208M |
|
| 87938 |
7320,7260M |
|
| 87941 |
7320,7260M |
|
| 87987 |
7345,7347,7259M |
|
| 87988 |
7320,7260M |
|
| 87997 |
7345,7347,7259M |
|
| 88026 |
7345,7347,7259M |
|
| 88036 |
7262,7256M |
|
| 88044 |
7258M |
|
| 88047 |
7345,7347,7259M |
|
| 88048 |
7345,7347,7259M |
|
| 88050 |
7345,7347,7259M |
|
| 88051 |
7345,7347,7259M |
|
| 88561 |
7210,7211,7214M |
0 |
| 90324 |
7265,7247M |
|
| 90326 |
7265,7247M |
|
| 90827 |
7241,7309,7346,7208M |
|
| 90828 |
7241,7309,7346,7208M |
|