Query time 0.00073
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.082059908,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"loops": 1,
"rows": 21,
"cost": 0.022871025,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (13860,13876,13879,13896,13895,13899,13861,13857,13859,13858,13897,13866,13894,13873,13889,13885,13884,13892,13891,13890,13893)",
"using_index": true
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["u508912950_dev_2025.cscart_products_categories.category_id"],
"loops": 21,
"rows": 1,
"cost": 0.02206004,
"filtered": 100,
"attached_condition": "cscart_categories.storefront_id in (0,1) and (cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` in ('A','H')"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "6",
"used_key_parts": ["category_id", "product_id"],
"ref": [
"const",
"u508912950_dev_2025.cscart_products_categories.product_id"
],
"loops": 21,
"rows": 1,
"cost": 0.02369844,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 13857 |
574M |
0 |
| 13858 |
574M |
0 |
| 13859 |
574M |
0 |
| 13860 |
574M |
0 |
| 13861 |
574M |
0 |
| 13866 |
574M |
0 |
| 13873 |
574M |
0 |
| 13876 |
574M |
0 |
| 13879 |
574M |
0 |
| 13884 |
574M |
0 |
| 13885 |
574M |
0 |
| 13889 |
574M |
0 |
| 13890 |
574M |
0 |
| 13891 |
574M |
0 |
| 13892 |
574M |
0 |
| 13893 |
574M |
0 |
| 13894 |
574M |
0 |
| 13895 |
574M |
0 |
| 13896 |
574M |
0 |
| 13897 |
574M |
0 |
| 13899 |
574M |
0 |