Query time 0.00073
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.093701944,
"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": 30,
"cost": 0.01261711,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (14136,14145,14131,14142,14133,14137,14143)",
"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": 30,
"rows": 1,
"cost": 0.03011,
"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": 30,
"rows": 1,
"cost": 0.0317484,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 14131 |
1395,1406,1669,1393M |
0 |
| 14133 |
644,1393,1395,1406M |
0 |
| 14136 |
925,1393,1395,1406M |
0 |
| 14137 |
1393,1395,1406,925M |
0 |
| 14142 |
925,1125,1393,1406M |
0 |
| 14143 |
1125,1127,1393,1402,1408,1406M |
0 |
| 14145 |
1393,1402,1406,1125M |
0 |