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": 21,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (7795,9781,9795,9798,9790,9797,10906,9783,9774,8244,9772,8424,10828,9358,11468,7021,7552,7606,9903,8421,8430)"
}
},
{
"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 |
| 7021 |
466M |
0 |
| 7552 |
466M |
0 |
| 7606 |
466M |
0 |
| 7795 |
565M |
|
| 8244 |
565M |
|
| 8421 |
466M |
0 |
| 8424 |
466M |
0 |
| 8430 |
466M |
0 |
| 9358 |
466M |
0 |
| 9772 |
565M |
|
| 9774 |
565M |
|
| 9781 |
565M |
|
| 9783 |
565M |
|
| 9790 |
565M |
|
| 9795 |
565M |
|
| 9797 |
565M |
|
| 9798 |
565M |
|
| 9903 |
466M |
0 |
| 10828 |
466M |
0 |
| 10906 |
565M |
|
| 11468 |
466M |
0 |