Query time 0.00154
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "174.69"
},
"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": 199,
"rows_produced_per_join": 199,
"filtered": "100.00",
"index_condition": "(`dbggbern`.`cscart_products_categories`.`product_id` in (7354,7869,3636,7352,4115,3043,7026,7025,7024,7027,6755,6756,6754,5867,5865,5863,5868,5864,5862,5869,6368,6824,5149,6029,6028,6030,7651,7645,7647,7648,7649,7646,6026,6027,6858,6857,6855,6860,6859,6856,6854,6852,6853,6850,6851,5503,6760,6762))",
"cost_info": {
"read_cost": "81.66",
"eval_cost": "19.90",
"prefix_cost": "101.56",
"data_read_per_join": "3K"
},
"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": 9,
"filtered": "5.00",
"cost_info": {
"read_cost": "49.75",
"eval_cost": "1.00",
"prefix_cost": "171.21",
"data_read_per_join": "39K"
},
"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": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.49",
"eval_cost": "1.00",
"prefix_cost": "174.69",
"data_read_per_join": "159"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 3043 |
23,39,7M |
0 |
| 3636 |
23,39,7M |
0 |
| 4115 |
7,39,36M |
0 |
| 5149 |
8,186,187,23,7M |
0 |
| 5503 |
7,167,1,23M |
0 |
| 5862 |
23,9,7M |
0 |
| 5863 |
23,9,7M |
0 |
| 5864 |
23,16,7M |
0 |
| 5865 |
23,16,7M |
0 |
| 5867 |
23,8,349,182,7M |
0 |
| 5868 |
23,167,7M |
0 |
| 5869 |
23,167,7M |
0 |
| 6026 |
22,167,23,7M |
0 |
| 6027 |
22,167,23,7M |
0 |
| 6028 |
22,167,23,7M |
0 |
| 6029 |
22,167,23,7M |
0 |
| 6030 |
22,167,23,7M |
0 |
| 6368 |
23,401,7,8,349,182,1M |
0 |
| 6754 |
23,167,7M |
0 |
| 6755 |
8,23,349,182,7M |
0 |
| 6756 |
16,23,7M |
0 |
| 6760 |
36,54,182,349,8,7M |
0 |
| 6762 |
16,23,36,54,7M |
0 |
| 6824 |
23,39,7M |
0 |
| 6850 |
23,167,7M |
0 |
| 6851 |
167,23,7M |
0 |
| 6852 |
7M |
0 |
| 6853 |
7M |
0 |
| 6854 |
23,39,7M |
0 |
| 6855 |
349,23,182,8,7M |
0 |
| 6856 |
9,23,7M |
0 |
| 6857 |
8,349,182,23,7M |
0 |
| 6858 |
8,182,23,349,7M |
0 |
| 6859 |
23,9,7M |
0 |
| 6860 |
23,9,7M |
0 |
| 7024 |
7,9,23M |
0 |
| 7025 |
16,7,23M |
0 |
| 7026 |
8,349,182,7,23M |
0 |
| 7027 |
167,7,23M |
0 |
| 7352 |
39,187,23,7M |
0 |
| 7354 |
7,39,23M |
0 |
| 7645 |
167,23,7M |
0 |
| 7646 |
167,23,7M |
0 |
| 7647 |
167,23,7M |
0 |
| 7648 |
167,23,7M |
0 |
| 7649 |
167,23,7M |
0 |
| 7651 |
167,23,7M |
0 |
| 7869 |
23,7M |
0 |