Query time 0.00031
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.048015612,
"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": 11,
"cost": 0.013136975,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (14024,14020,14026,14031,14025,14030,14029,14021,14023,14028,14027)",
"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": 11,
"rows": 1,
"cost": 0.01311564,
"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": 11,
"rows": 1,
"cost": 0.01475404,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 14020 |
578M |
0 |
| 14021 |
578M |
0 |
| 14023 |
578M |
0 |
| 14024 |
578M |
0 |
| 14025 |
578M |
0 |
| 14026 |
578M |
0 |
| 14027 |
578M |
0 |
| 14028 |
578M |
0 |
| 14029 |
578M |
0 |
| 14030 |
578M |
0 |
| 14031 |
578M |
0 |