Query time 0.01120
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "75.89"
},
"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 (88062,87905,87904,88036,87900,87901,88088,88056,88057,88058,88037,88059,88060,87940,88091,88090,88087,88086,94827,94828,94829,94830,94831,95736,99077,99078,99081,99082,99114,99214,99215,99234,99235,99236,99237,99238,99240,99264,99265,99266,99268,99269))"
}
},
{
"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": 84,
"filtered": "100.00",
"cost_info": {
"read_cost": "21.00",
"eval_cost": "8.40",
"prefix_cost": "46.49",
"data_read_per_join": "1K"
},
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "21.00",
"eval_cost": "0.42",
"prefix_cost": "75.89",
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 87900 |
7256M,7262 |
0 |
| 87901 |
7256M,7262 |
0 |
| 87904 |
7262,7256M |
0 |
| 87905 |
7262,7256M |
0 |
| 87940 |
7256M,7262 |
0 |
| 88036 |
7256M,7262 |
0 |
| 88037 |
7262,7256M |
0 |
| 88056 |
7262,7256M |
0 |
| 88057 |
7262,7256M |
0 |
| 88058 |
7262,7256M |
0 |
| 88059 |
7262,7256M |
0 |
| 88060 |
7262,7256M |
0 |
| 88062 |
7256M,7262 |
0 |
| 88086 |
7256M,7262 |
0 |
| 88087 |
7262,7256M |
0 |
| 88088 |
7262,7256M |
0 |
| 88090 |
7262,7256M |
0 |
| 88091 |
7262,7256M |
0 |
| 94827 |
7256M,7262 |
0 |
| 94828 |
7256M,7262 |
0 |
| 94829 |
7262,7256M |
0 |
| 94830 |
7262,7256M |
0 |
| 94831 |
7262,7256M |
0 |
| 95736 |
7262,7256M |
0 |
| 99077 |
7262,7256M |
0 |
| 99078 |
7256M,7262 |
0 |
| 99081 |
7256M,7262 |
0 |
| 99082 |
7256M,7262 |
0 |
| 99114 |
7262,7256M |
0 |
| 99214 |
7256M,7262 |
0 |
| 99215 |
7256M,7262 |
0 |
| 99234 |
7262,7256M |
0 |
| 99235 |
7262,7256M |
0 |
| 99236 |
7262,7256M |
0 |
| 99237 |
7262,7256M |
0 |
| 99238 |
7262,7256M |
0 |
| 99240 |
7262,7256M |
0 |
| 99264 |
7256M,7262 |
0 |
| 99265 |
7256M,7262 |
0 |
| 99266 |
7262,7256M |
0 |
| 99268 |
7262,7256M |
0 |
| 99269 |
7256M,7262 |
0 |