Query time 0.00067
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.245769682,
"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": 86,
"cost": 0.02827195,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (16337,16336,15745,14662,14148,14131,14142,14138,14133,14137,15734,14143,14653,14655,14659,15741)",
"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": 86,
"rows": 1,
"cost": 0.08019864,
"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": 86,
"rows": 1,
"cost": 0.08183704,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 14131 |
1395,1406,1669,1393M |
|
| 14133 |
644,1393,1395,1406M |
|
| 14137 |
1393,1395,1406,925M |
|
| 14138 |
925,1125,1393,1395M |
0 |
| 14142 |
925,1125,1393,1406M |
0 |
| 14143 |
1125,1127,1393,1402,1408,1406M |
0 |
| 14148 |
925,1125,1126,1127,1402M |
0 |
| 14653 |
925,1125,1395,1405,1672M |
0 |
| 14655 |
925,1125,1393,1395,1669,1672M |
0 |
| 14659 |
925,1125,1395,1669M |
0 |
| 14662 |
646,925,1125,1395,1669,1396M |
0 |
| 15734 |
215,1397,1613,1614,1620,1671M |
|
| 15741 |
1397,1613,1614,1617,1620,1671M |
|
| 15745 |
1397,1613,1614,1620,1671,1617M |
|
| 16336 |
925,1125,1397,1613,1620,1670,1671,1396M |
0 |
| 16337 |
925,1125,1397,1613,1620,1670,1671,1396M |
0 |