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": 24,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (8025,7284,8162,8217,19483,18035,18042,8122,10101,13549,11988,7596,7599,7009,6991,10052,11496,11586,12898,18058,18640,18636,18425,18064)"
}
},
{
"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 |
| 6991 |
506M |
0 |
| 7009 |
506M |
0 |
| 7284 |
506M |
0 |
| 7596 |
506M |
0 |
| 7599 |
506M |
0 |
| 8025 |
506M |
0 |
| 8122 |
506M |
0 |
| 8162 |
506M |
0 |
| 8217 |
506M |
0 |
| 10052 |
506M |
0 |
| 10101 |
506M |
0 |
| 11496 |
506M |
0 |
| 11586 |
506M |
0 |
| 11988 |
506M |
0 |
| 12898 |
506M |
0 |
| 13549 |
506M |
0 |
| 18035 |
506M |
0 |
| 18042 |
506M |
0 |
| 18058 |
506M |
0 |
| 18064 |
506M |
0 |
| 18425 |
506M |
0 |
| 18636 |
506M |
0 |
| 18640 |
506M |
0 |
| 19483 |
506M |
0 |