Query time 0.00076
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": 36,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (21639,18958,22905,18981,22906,18982,22907,18984,22909,22048,22910,22055,22911,22052,22912,22054,23988,22064,23989,22063,23990,22062,23991,22056)"
}
},
{
"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 |
| 18958 |
837M |
|
| 18981 |
837M |
|
| 18982 |
837M |
|
| 18984 |
837M |
|
| 21639 |
837M |
|
| 22048 |
837M |
|
| 22052 |
837M |
|
| 22054 |
837M |
|
| 22055 |
837M |
|
| 22056 |
837M |
|
| 22062 |
837M |
|
| 22063 |
837M |
|
| 22064 |
837M |
|
| 22905 |
1157M |
|
| 22906 |
1157M |
|
| 22907 |
1157M |
|
| 22909 |
1157M |
|
| 22910 |
1157M |
|
| 22911 |
1157M |
|
| 22912 |
1157M |
|
| 23988 |
1157M |
|
| 23989 |
1157M |
|
| 23990 |
1157M |
|
| 23991 |
1157M |
|