Query time 0.00076
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "57.88"
},
"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": 64,
"rows_produced_per_join": 64,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.68",
"eval_cost": "6.40",
"prefix_cost": "13.08",
"data_read_per_join": "1024"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (87189,87206,87223,87261,87188,87205,87222,87230,89086,89087,87260,89085,88170,88218,88194,88206,87271,87272,87273,88668,88715,88762,87279,87278,87277,87268,87266,87270,87263,87267,87451,87452,88558,88571,88608,88665,88666,88667,88712,88713,88714,88751,88760,88761,91461,87264,87262,87265))"
}
},
{
"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": 64,
"filtered": "100.00",
"cost_info": {
"read_cost": "16.00",
"eval_cost": "6.40",
"prefix_cost": "35.48",
"data_read_per_join": "1024"
},
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "16.00",
"eval_cost": "0.32",
"prefix_cost": "57.88",
"data_read_per_join": "8K"
},
"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 |
| 87188 |
7245M |
|
| 87189 |
7245M |
|
| 87205 |
7245M |
|
| 87206 |
7245M |
|
| 87222 |
7245M |
|
| 87223 |
7245M |
|
| 87230 |
7245M |
|
| 87260 |
7244,7245M |
0 |
| 87261 |
7244,7245M |
0 |
| 87262 |
7244,7246M |
0 |
| 87263 |
7244,7246M |
0 |
| 87264 |
7244,7246M |
0 |
| 87265 |
7244,7246M |
0 |
| 87266 |
7244,7246M |
0 |
| 87267 |
7244,7246M |
0 |
| 87268 |
7244,7246M |
0 |
| 87270 |
7244,7246M |
0 |
| 87271 |
7244,7246M |
0 |
| 87272 |
7244,7246M |
0 |
| 87273 |
7244,7246M |
0 |
| 87277 |
7244,7246M |
0 |
| 87278 |
7244,7246M |
0 |
| 87279 |
7244,7246M |
0 |
| 87451 |
7245M |
|
| 87452 |
7245M |
|
| 88170 |
7245M |
|
| 88194 |
7245M |
|
| 88206 |
7245M |
|
| 88218 |
7245M |
|
| 88558 |
7245M |
|
| 88571 |
7245M |
|
| 88608 |
7245M |
|
| 88665 |
7245M |
|
| 88666 |
7245M |
|
| 88667 |
7245M |
|
| 88668 |
7245M |
|
| 88712 |
7245M |
|
| 88713 |
7245M |
|
| 88714 |
7245M |
|
| 88715 |
7245M |
|
| 88751 |
7245M |
|
| 88760 |
7245M |
|
| 88761 |
7245M |
|
| 88762 |
7245M |
|
| 89085 |
7245M |
|
| 89086 |
7245M |
|
| 89087 |
7245M |
|
| 91461 |
7245M |
|