Query time 0.00093
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": 25,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (11310,10203,9836,10204,10899,6833,10465,9603,9235,9164,11308,11312,22273,13179,8735,9055,21533,22369,12135,12130,7340,12133,7008,7765)"
}
},
{
"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 |
| 6833 |
513M |
|
| 7008 |
513M |
|
| 7340 |
442M |
|
| 7765 |
513M |
|
| 8735 |
442M |
|
| 9055 |
442M |
|
| 9164 |
575M |
|
| 9235 |
854M |
|
| 9603 |
694M |
|
| 9836 |
513M |
|
| 10203 |
513M |
|
| 10204 |
513M |
|
| 10465 |
694M |
|
| 10899 |
513M |
|
| 11308 |
575M |
|
| 11310 |
513M |
|
| 11312 |
575M |
|
| 12130 |
442M |
|
| 12133 |
442M |
|
| 12135 |
442M |
|
| 13179 |
442M |
|
| 21533 |
442M |
|
| 22273 |
442M |
|
| 22369 |
442M |
|