Query time 0.00063
JSON explain
{
"query_block": {
"select_id": 1,
"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"],
"rows": 26,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (10637,10807,10634,7038,24218,24220,24221,24222,24223,8225,10597,10276,10982,10081,10085,7111,10178,9341,11506,24219)"
}
},
{
"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": ["lillyshop_lillyshop.cscart_products_categories.category_id"],
"rows": 1,
"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",
"lillyshop_lillyshop.cscart_products_categories.product_id"
],
"rows": 1,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 7038 |
529M |
0 |
| 7111 |
529M |
0 |
| 8225 |
529M |
0 |
| 9341 |
529M |
0 |
| 10081 |
529M |
0 |
| 10085 |
529M |
0 |
| 10178 |
529M |
0 |
| 10276 |
529M |
0 |
| 10597 |
529M |
0 |
| 10634 |
529M |
0 |
| 10637 |
529M |
0 |
| 10807 |
529M |
0 |
| 10982 |
529M |
0 |
| 11506 |
529M |
0 |
| 24218 |
529M |
0 |
| 24219 |
529M |
0 |
| 24220 |
529M |
0 |
| 24221 |
529M |
0 |
| 24222 |
529M |
0 |
| 24223 |
529M |
0 |