Query time 0.00078
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": 37,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (22926,19005,22927,22051,22053,22929,22930,22047,22045,24017,22479,22932,22049,24105,24044,22059,21638,22934,21635,22935,18911,22936,18912,22937)"
}
},
{
"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 |
| 18911 |
837M |
|
| 18912 |
837M |
|
| 19005 |
837M |
|
| 21635 |
837M |
|
| 21638 |
837M |
|
| 22045 |
837M |
|
| 22047 |
837M |
|
| 22049 |
837M |
|
| 22051 |
837M |
|
| 22053 |
837M |
|
| 22059 |
837M |
|
| 22479 |
837M |
|
| 22926 |
1157M |
|
| 22927 |
1157M |
|
| 22929 |
1157M |
|
| 22930 |
1157M |
|
| 22932 |
1157M |
|
| 22934 |
1157M |
|
| 22935 |
1157M |
|
| 22936 |
1157M |
|
| 22937 |
1157M |
|
| 24017 |
1157M |
|
| 24044 |
1157M |
|
| 24105 |
1157M |
|