Query time 0.00135
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.52"
},
"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": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.08",
"eval_cost": "4.80",
"prefix_cost": "9.88",
"data_read_per_join": "768"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (83897,83898,83900,83901,83902,83903,83904,83905,83906,91735,91736,91737,91738,91739,91740,91741,91742,91743,91744,91745,91746,91747,91748,91749,91750,91751,91752,91753,91754,91816,91817,91818,91819,91820,91821,91822,91823,91824,91825,91826,91827,91828,91829,91830,91831,91832,91833,91834))"
}
},
{
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "0.24",
"prefix_cost": "26.68",
"data_read_per_join": "6K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.60",
"eval_cost": "0.24",
"prefix_cost": "27.52",
"data_read_per_join": "38"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83897 |
7255M |
0 |
| 83898 |
7255M |
0 |
| 83900 |
7255M |
0 |
| 83901 |
7255M |
0 |
| 83902 |
7255M |
0 |
| 83903 |
7255M |
0 |
| 83904 |
7255M |
0 |
| 83905 |
7255M |
0 |
| 83906 |
7255M |
0 |
| 91735 |
7255M |
0 |
| 91736 |
7255M |
0 |
| 91737 |
7255M |
0 |
| 91738 |
7255M |
0 |
| 91739 |
7255M |
0 |
| 91740 |
7255M |
0 |
| 91741 |
7255M |
0 |
| 91742 |
7255M |
0 |
| 91743 |
7255M |
0 |
| 91744 |
7255M |
0 |
| 91745 |
7255M |
0 |
| 91746 |
7255M |
0 |
| 91747 |
7255M |
0 |
| 91748 |
7255M |
0 |
| 91749 |
7255M |
0 |
| 91750 |
7255M |
0 |
| 91751 |
7255M |
0 |
| 91752 |
7255M |
0 |
| 91753 |
7255M |
0 |
| 91754 |
7255M |
0 |
| 91816 |
7255M |
0 |
| 91817 |
7255M |
0 |
| 91818 |
7255M |
0 |
| 91819 |
7255M |
0 |
| 91820 |
7255M |
0 |
| 91821 |
7255M |
0 |
| 91822 |
7255M |
0 |
| 91823 |
7255M |
0 |
| 91824 |
7255M |
0 |
| 91825 |
7255M |
0 |
| 91826 |
7255M |
0 |
| 91827 |
7255M |
0 |
| 91828 |
7255M |
0 |
| 91829 |
7255M |
0 |
| 91830 |
7255M |
0 |
| 91831 |
7255M |
0 |
| 91832 |
7255M |
0 |
| 91833 |
7255M |
0 |
| 91834 |
7255M |
0 |