Query time 0.00178
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "47.96"
},
"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": 84,
"rows_produced_per_join": 84,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.69",
"eval_cost": "8.40",
"prefix_cost": "17.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 (89838,89890,89962,91528,88445,85679,88496,91438,91452,87516,87532,88448,88465,88481,88793,84763,88784,88065,88142,88145,88171,88219,89103,89111,88074,89572,88069,88785,90830,84772))"
}
},
{
"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.00",
"eval_cost": "0.42",
"prefix_cost": "46.49",
"data_read_per_join": "10K"
},
"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.05",
"eval_cost": "0.42",
"prefix_cost": "47.96",
"data_read_per_join": "67"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 84763 |
7210,7211,7212M |
0 |
| 84772 |
7210,7211,7214M |
0 |
| 85679 |
7210,7211,7214M |
0 |
| 87516 |
7210,7211,7214M |
0 |
| 87532 |
7210,7211,7214M |
0 |
| 88065 |
7258M |
|
| 88069 |
7320,7260M |
|
| 88074 |
7258M |
|
| 88142 |
7241,7309,7346,7208M |
|
| 88145 |
7241,7309,7346,7208M |
|
| 88171 |
7210,7211,7214M |
0 |
| 88219 |
7210,7211,7214M |
0 |
| 88445 |
7210,7211,7212M |
0 |
| 88448 |
7210,7211,7214M |
0 |
| 88465 |
7210,7211,7214M |
0 |
| 88481 |
7210,7211,7214M |
0 |
| 88496 |
7210,7211,7214M |
0 |
| 88784 |
7210,7211,7214M |
0 |
| 88785 |
7210,7211,7214M |
0 |
| 88793 |
7210,7211,7282M |
0 |
| 89103 |
7210,7211,7212M |
0 |
| 89111 |
7210,7211,7212M |
0 |
| 89572 |
7210,7240,7241M |
0 |
| 89838 |
7210,7211,7212M |
0 |
| 89890 |
7210,7211,7212M |
0 |
| 89962 |
7210,7211,7212M |
0 |
| 90830 |
7210,7211,7212M |
0 |
| 91438 |
7211,7210M |
0 |
| 91452 |
7211,7210M |
0 |
| 91528 |
7211,7210M |
0 |