Query time 0.00067
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": 47,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (24185,24181,24204,24172,24217,24211,24177,24186,24200,24197,24196,24210,24208,24175,24178,22731,23137,23009,22732,22581,23384,23010,23366,22733)"
}
},
{
"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 |
| 22581 |
435M |
|
| 22731 |
435M |
|
| 22732 |
435M |
|
| 22733 |
435M |
|
| 23009 |
435M |
|
| 23010 |
435M |
|
| 23137 |
435M |
|
| 23366 |
435M |
|
| 23384 |
435M |
|
| 24172 |
1032M |
|
| 24175 |
1032M |
|
| 24177 |
1032M |
|
| 24178 |
1032M |
|
| 24181 |
1032M |
|
| 24185 |
1032M |
|
| 24186 |
1032M |
|
| 24196 |
1032M |
|
| 24197 |
1032M |
|
| 24200 |
1032M |
|
| 24204 |
1032M |
|
| 24208 |
1032M |
|
| 24210 |
1032M |
|
| 24211 |
1032M |
|
| 24217 |
1032M |
|