Query time 0.00120
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "28.17"
},
"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": 31,
"rows_produced_per_join": 31,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.37",
"eval_cost": "3.10",
"prefix_cost": "6.47",
"data_read_per_join": "496"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92176,92177,92178,92322,92323,92324,83897,83898,83900,83901,83902,83903,83904,83905,83906,88062,91735,91736,91737,91738,91739,91740,91741,91742,91743,91744,91745,91746,91747,91748))"
}
},
{
"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": 31,
"filtered": "100.00",
"cost_info": {
"read_cost": "7.75",
"eval_cost": "3.10",
"prefix_cost": "17.32",
"data_read_per_join": "496"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"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": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "7.75",
"eval_cost": "0.16",
"prefix_cost": "28.17",
"data_read_per_join": "4K"
},
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83897 |
7255M |
|
| 83898 |
7255M |
|
| 83900 |
7255M |
|
| 83901 |
7255M |
|
| 83902 |
7255M |
|
| 83903 |
7255M |
|
| 83904 |
7255M |
|
| 83905 |
7255M |
|
| 83906 |
7255M |
|
| 88062 |
7262,7256M |
|
| 91735 |
7255M |
|
| 91736 |
7255M |
|
| 91737 |
7255M |
|
| 91738 |
7255M |
|
| 91739 |
7255M |
|
| 91740 |
7255M |
|
| 91741 |
7255M |
|
| 91742 |
7255M |
|
| 91743 |
7255M |
|
| 91744 |
7255M |
|
| 91745 |
7255M |
|
| 91746 |
7255M |
|
| 91747 |
7255M |
|
| 91748 |
7255M |
|
| 92176 |
7205M |
|
| 92177 |
7205M |
|
| 92178 |
7205M |
|
| 92322 |
7205M |
|
| 92323 |
7205M |
|
| 92324 |
7205M |
|