Query time 0.00071
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.119884755,
"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": 35,
"cost": 0.031545895,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (398,500,146,147,148,759,149,150,151,152,153,3,507,509,481,510,511,449,482,513,484,492,493,494,495,515,516,517,518,519)",
"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": [
"u428615623_ecartifygonje.cscart_products_categories.category_id"
],
"loops": 35,
"rows": 1,
"cost": 0.0321246,
"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",
"u428615623_ecartifygonje.cscart_products_categories.product_id"
],
"loops": 35,
"rows": 1,
"cost": 0.033763,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 3 |
3,4,9,2M |
0 |
| 146 |
2M |
0 |
| 147 |
2M |
0 |
| 148 |
2M |
0 |
| 149 |
2M |
0 |
| 150 |
2M |
0 |
| 151 |
2M |
0 |
| 152 |
2M |
0 |
| 153 |
2M |
0 |
| 398 |
25M |
|
| 449 |
31M |
|
| 481 |
2M |
0 |
| 482 |
31M |
|
| 484 |
2M |
0 |
| 492 |
2M |
0 |
| 493 |
2M |
0 |
| 494 |
2M |
0 |
| 495 |
2M |
0 |
| 500 |
2M |
0 |
| 507 |
2M |
0 |
| 509 |
2M |
0 |
| 510 |
2M |
0 |
| 511 |
2M |
0 |
| 513 |
2M |
0 |
| 515 |
2M |
0 |
| 516 |
2M |
0 |
| 517 |
2M |
0 |
| 518 |
2M |
0 |
| 519 |
2M |
0 |
| 759 |
2M |
0 |