Query time 0.00112
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.122587763,
"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": 24,
"cost": 0.04381364,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (422451,420738,440135,427608,430254,422033,405045,420628,445650,409275,417856,421213,459072,434781,459407,447088,436478,422140,428560,456487,411199,403278,449543,407451)",
"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": ["u985510652_ecartify.cscart_products_categories.category_id"],
"loops": 24,
"rows": 1,
"cost": 0.02228576,
"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",
"u985510652_ecartify.cscart_products_categories.product_id"
],
"loops": 24,
"rows": 1,
"cost": 0.04112736,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 403278 |
305M |
0 |
| 405045 |
305M |
0 |
| 407451 |
305M |
0 |
| 409275 |
305M |
0 |
| 411199 |
305M |
0 |
| 417856 |
305M |
0 |
| 420628 |
305M |
0 |
| 420738 |
305M |
0 |
| 421213 |
305M |
0 |
| 422033 |
305M |
0 |
| 422140 |
305M |
0 |
| 422451 |
305M |
0 |
| 427608 |
305M |
0 |
| 428560 |
305M |
0 |
| 430254 |
305M |
0 |
| 434781 |
305M |
0 |
| 436478 |
305M |
0 |
| 440135 |
305M |
0 |
| 445650 |
305M |
0 |
| 447088 |
305M |
0 |
| 449543 |
305M |
0 |
| 456487 |
305M |
0 |
| 459072 |
305M |
0 |
| 459407 |
305M |
0 |