Query time 0.00101
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": 24,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (6796,6797,6798,6801,6917,6799,6918,6802,6803,6804,6805,6807,6808,6809,6810,10195,6811,6812,8241,6800,6806,11059,6813,6919)"
}
},
{
"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 |
| 6796 |
435M |
|
| 6797 |
435M |
|
| 6798 |
435M |
|
| 6799 |
435M |
|
| 6800 |
435M |
|
| 6801 |
435M |
|
| 6802 |
435M |
|
| 6803 |
435M |
|
| 6804 |
435M |
|
| 6805 |
435M |
|
| 6806 |
435M |
|
| 6807 |
435M |
|
| 6808 |
435M |
|
| 6809 |
435M |
|
| 6810 |
435M |
|
| 6811 |
435M |
|
| 6812 |
435M |
|
| 6813 |
435M |
|
| 6917 |
435M |
|
| 6918 |
435M |
|
| 6919 |
435M |
|
| 8241 |
435M |
|
| 10195 |
435M |
|
| 11059 |
435M |
|