Query time 0.00184
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "44.38"
},
"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": 49,
"rows_produced_per_join": 49,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.18",
"eval_cost": "4.90",
"prefix_cost": "10.08",
"data_read_per_join": "784"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92176,92177,92178,91061,84716,85272,85273,88063,84738,92171,84726,84742,91063,91062,91057,92322,92323,92324,83897,83898,83900,83901,83902,83903,83904,83905,83906,84935,88062,91060,91055,91058,84858,91735,91736,91737,91738,91739,91740,91741,91742,91743,91744,91745,91746,91747,91748,91749))"
}
},
{
"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": 49,
"filtered": "100.00",
"cost_info": {
"read_cost": "12.25",
"eval_cost": "4.90",
"prefix_cost": "27.23",
"data_read_per_join": "784"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.25",
"eval_cost": "0.25",
"prefix_cost": "44.38",
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83897 |
7255M |
|
| 83898 |
7255M |
|
| 83900 |
7255M |
|
| 83901 |
7255M |
|
| 83902 |
7255M |
|
| 83903 |
7255M |
|
| 83904 |
7255M |
|
| 83905 |
7255M |
|
| 83906 |
7255M |
|
| 84716 |
7203M |
|
| 84726 |
7203M |
|
| 84738 |
7203M |
|
| 84742 |
7203M |
|
| 84858 |
7203M |
|
| 84935 |
7203M |
|
| 85272 |
7216M |
|
| 85273 |
7216M |
|
| 88062 |
7262,7256M |
|
| 88063 |
7209M |
|
| 91055 |
7209M |
|
| 91057 |
7209M |
|
| 91058 |
7209M |
|
| 91060 |
7209M |
|
| 91061 |
7209M |
|
| 91062 |
7209M |
|
| 91063 |
7209M |
|
| 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 |
|
| 91749 |
7255M |
|
| 92171 |
7203M |
|
| 92176 |
7205M |
|
| 92177 |
7205M |
|
| 92178 |
7205M |
|
| 92322 |
7205M |
|
| 92323 |
7205M |
|
| 92324 |
7205M |
|