Query time 0.01538
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "72.29"
},
"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": 80,
"rows_produced_per_join": 80,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.29",
"eval_cost": "8.00",
"prefix_cost": "16.29",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88290,88291,88292,88293,88386,88387,89687,89688,89690,89691,89692,89693,88285,88286,88385,88283,88284,89685,89686,88383,88384,89683,89684,88363,88109,88121,88133,88280,88281,88282))"
}
},
{
"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": 80,
"filtered": "100.00",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "8.00",
"prefix_cost": "44.29",
"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": "20.00",
"eval_cost": "0.40",
"prefix_cost": "72.29",
"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 |
| 88109 |
7270,7277M,7237 |
0 |
| 88121 |
7237,7270,7293M |
0 |
| 88133 |
7270,7237,7299M |
0 |
| 88280 |
7270,7271M,7237 |
0 |
| 88281 |
7271M,7237,7270 |
0 |
| 88282 |
7271M,7237,7270 |
0 |
| 88283 |
7271M,7270,7237 |
0 |
| 88284 |
7237,7271M,7270 |
0 |
| 88285 |
7271M,7237,7270 |
0 |
| 88286 |
7237,7271M,7270 |
0 |
| 88290 |
7237,7271M,7270 |
0 |
| 88291 |
7237,7271M,7270 |
0 |
| 88292 |
7237,7271M,7270 |
0 |
| 88293 |
7270,7237,7271M |
0 |
| 88363 |
7270,7277M,7237 |
0 |
| 88383 |
7352M |
|
| 88384 |
7352M |
|
| 88385 |
7352M |
|
| 88386 |
7352M |
|
| 88387 |
7352M |
|
| 89683 |
7237,7293M,7270 |
0 |
| 89684 |
7293M,7237,7270 |
0 |
| 89685 |
7270,7237,7293M |
0 |
| 89686 |
7237,7270,7293M |
0 |
| 89687 |
7293M,7237,7270 |
0 |
| 89688 |
7293M,7237,7270 |
0 |
| 89690 |
7270,7237,7293M |
0 |
| 89691 |
7237,7293M,7270 |
0 |
| 89692 |
7237,7293M,7270 |
0 |
| 89693 |
7270,7293M,7237 |
0 |