Query time 0.00420
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "239.27"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 278,
"rows_produced_per_join": 278,
"filtered": "100.00",
"index_condition": "(`dbggbern`.`cscart_products_categories`.`product_id` in (6303,6304,5801,5802,5800,5799,5803,5804,7197,7195,7196,7190,7189,7194,7191,5032,5033,7674,7675,6967,6966,6645,6644,6647,6648,4352,4354,5391,5392,5388,5390,5389,5396,5395,5394,5034,5035,5030,5031,5168,5169,6982,6132,7150,7149,7148,7151,6768))",
"cost_info": {
"read_cost": "109.31",
"eval_cost": "27.80",
"prefix_cost": "137.11",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": [
"dbggbern.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 13,
"filtered": "5.00",
"cost_info": {
"read_cost": "69.50",
"eval_cost": "1.39",
"prefix_cost": "234.41",
"data_read_per_join": "55K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`dbggbern`.`cscart_categories`.`storefront_id` in (0,1)) and ((`dbggbern`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`dbggbern`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`dbggbern`.`cscart_categories`.`usergroup_ids`))) and (`dbggbern`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"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",
"dbggbern.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 13,
"filtered": "100.00",
"cost_info": {
"read_cost": "3.48",
"eval_cost": "1.39",
"prefix_cost": "239.28",
"data_read_per_join": "222"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 4352 |
327,7,9,325M |
0 |
| 4354 |
327,7,167,325M |
0 |
| 5030 |
182,8,276,349,325M |
|
| 5031 |
182,8,276,349,325M |
|
| 5032 |
7,454,276,9,325M |
0 |
| 5033 |
7,454,276,9,325M |
0 |
| 5034 |
454,7,167,325M |
0 |
| 5035 |
454,7,167,325M |
0 |
| 5168 |
7,51,35,167,29M |
0 |
| 5169 |
7,51,35,167,29M |
0 |
| 5388 |
495,8,331,329,7,276,349,325M |
0 |
| 5389 |
495,8,331,329,7,276,349,325M |
0 |
| 5390 |
495,8,331,329,7,276,349,325M |
0 |
| 5391 |
495,9,331,329,7,325M |
0 |
| 5392 |
495,9,331,329,7,325M |
0 |
| 5394 |
495,167,331,329,7,325M |
0 |
| 5395 |
16,331,329,276,7,495,325M |
0 |
| 5396 |
495,16,331,329,7,325M |
0 |
| 5799 |
7,331,9,329,521,325M |
0 |
| 5800 |
7,331,9,329,521,325M |
0 |
| 5801 |
521,329,8,331,7,276,349,325M |
0 |
| 5802 |
521,329,8,331,7,276,349,325M |
0 |
| 5803 |
7,167,331,329,521,325M |
0 |
| 5804 |
7,167,331,329,521,325M |
0 |
| 6132 |
51,7,29M |
0 |
| 6303 |
331,7,575,325M |
0 |
| 6304 |
331,7,575,325M |
0 |
| 6644 |
331,582,7,9,325M |
0 |
| 6645 |
331,582,7,9,325M |
0 |
| 6647 |
8,7,331,582,349,182,325M |
0 |
| 6648 |
8,7,331,582,349,182,325M |
0 |
| 6768 |
7,349,8,182,29M |
0 |
| 6966 |
167,7,582,325M |
0 |
| 6967 |
167,7,582,325M |
0 |
| 6982 |
349,182,7,8,51,29M |
0 |
| 7148 |
7,349,8,182,29M |
0 |
| 7149 |
7,349,8,182,29M |
0 |
| 7150 |
7,349,8,182,29M |
0 |
| 7151 |
7,349,8,182,29M |
0 |
| 7189 |
641,9,7,331,325M |
0 |
| 7190 |
641,9,7,331,325M |
0 |
| 7191 |
641,182,349,8,7,331,325M |
0 |
| 7194 |
641,182,349,8,7,331,325M |
0 |
| 7195 |
641,167,7,325M |
0 |
| 7196 |
641,167,7,325M |
0 |
| 7197 |
641,7,16,325M |
0 |
| 7674 |
7,167,661,325M |
0 |
| 7675 |
661,167,7,325M |
0 |