Query time 0.00192
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "155.07"
},
"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": 175,
"rows_produced_per_join": 175,
"filtered": "100.00",
"index_condition": "(`dbggbern`.`cscart_products_categories`.`product_id` in (1477,1177,1178,1179,1184,1180,1181,1164,1165,5316,1186,1187,5855,7353,7413,7414,7415,7416,7417,7418,7421,7861,7862,7863,7864,6273,6274,7570,7571,7572,5706,5130,5129,7077,2471,4801,4802,5467,5469,5472,5468,5466,5470,5465,6934,6935,6933,3190))",
"cost_info": {
"read_cost": "73.26",
"eval_cost": "17.50",
"prefix_cost": "90.76",
"data_read_per_join": "2K"
},
"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": 8,
"filtered": "5.00",
"cost_info": {
"read_cost": "43.75",
"eval_cost": "0.88",
"prefix_cost": "152.01",
"data_read_per_join": "35K"
},
"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": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.19",
"eval_cost": "0.88",
"prefix_cost": "155.07",
"data_read_per_join": "140"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 1164 |
182,25,8M |
|
| 1165 |
182,25,8M |
|
| 1177 |
25,182,8M |
|
| 1178 |
182,25,8M |
|
| 1179 |
182,25,8M |
|
| 1180 |
25,182,8M |
|
| 1181 |
182,25,8M |
|
| 1184 |
182,25,8M |
|
| 1186 |
182,25,8M |
|
| 1187 |
182,25,8M |
|
| 1477 |
182,25,8M |
|
| 2471 |
167,59M |
|
| 3190 |
16,24,7M |
0 |
| 4801 |
59,349,25,7M |
0 |
| 4802 |
59,349,25,7M |
0 |
| 5129 |
274,7,182,349,25,59M |
0 |
| 5130 |
274,7,182,349,25,59M |
0 |
| 5316 |
8,349,25,7M |
0 |
| 5465 |
7,496,500,59M |
0 |
| 5466 |
7,496,500,59M |
0 |
| 5467 |
7,496,500,59M |
0 |
| 5468 |
7,496,500,59M |
0 |
| 5469 |
7,496,500,59M |
0 |
| 5470 |
7,496,500,59M |
0 |
| 5472 |
7,496,500,59M |
0 |
| 5706 |
59,8,274,349,498,25,7M |
0 |
| 5855 |
8,182,349,25,7M |
0 |
| 6273 |
664,349,8,67M |
|
| 6274 |
664,8,349,67M |
|
| 6933 |
24,16,7M |
0 |
| 6934 |
16,24,7M |
0 |
| 6935 |
16,24,7M |
0 |
| 7077 |
274,7,182,349,25,59M |
0 |
| 7353 |
10,178,151M |
|
| 7413 |
16,39,7M |
0 |
| 7414 |
16,39,7M |
0 |
| 7415 |
16,39,7M |
0 |
| 7416 |
16,39,7M |
0 |
| 7417 |
39,7M |
0 |
| 7418 |
39,7M |
0 |
| 7421 |
39,7M |
0 |
| 7570 |
167,322,7M |
0 |
| 7571 |
167,322,7M |
0 |
| 7572 |
167,322,7M |
0 |
| 7861 |
167,322,7M |
0 |
| 7862 |
167,322,7M |
0 |
| 7863 |
590,167,463,7M |
0 |
| 7864 |
590,167,7M |
0 |