Query time 0.00075
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": 42,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (23627,23628,23760,21170,24199,13314,12223,18136,13240,21856,24188,24193,24366,24207,24198,23631,23634,23629,23637,23635,23632,23630,24202,24176)"
}
},
{
"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 |
| 12223 |
468M |
|
| 13240 |
594M |
|
| 13314 |
768M |
|
| 18136 |
594M |
|
| 21170 |
1016M |
|
| 21856 |
1112M |
|
| 23627 |
726M |
|
| 23628 |
726M |
|
| 23629 |
1184M |
|
| 23630 |
1184M |
|
| 23631 |
1184M |
|
| 23632 |
1184M |
|
| 23634 |
1184M |
|
| 23635 |
1184M |
|
| 23637 |
1184M |
|
| 23760 |
726M |
|
| 24176 |
1032M |
|
| 24188 |
1032M |
|
| 24193 |
1032M |
|
| 24198 |
1032M |
|
| 24199 |
1032M |
|
| 24202 |
1032M |
|
| 24207 |
1032M |
|
| 24366 |
1032M |
|