Query time 0.00126
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 (19675,13070,9886,11019,19953,10051,24411,21851,10521,7569,9972,10839,21226,10517,9479,22140,22141,7571,9154,10047,7648,10676,10044,9684)"
}
},
{
"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 |
| 7569 |
552M |
0 |
| 7571 |
552M |
0 |
| 7648 |
552M |
0 |
| 9154 |
552M |
0 |
| 9479 |
552M |
0 |
| 9684 |
552M |
0 |
| 9886 |
552M |
0 |
| 9972 |
552M |
0 |
| 10044 |
552M |
0 |
| 10047 |
552M |
0 |
| 10051 |
552M |
0 |
| 10517 |
552M |
0 |
| 10521 |
552M |
0 |
| 10676 |
552M |
0 |
| 10839 |
552M |
0 |
| 11019 |
552M |
0 |
| 13070 |
552M |
0 |
| 19675 |
552M |
0 |
| 19953 |
552M |
0 |
| 21226 |
552M |
0 |
| 21851 |
552M |
0 |
| 22140 |
552M |
0 |
| 22141 |
552M |
0 |
| 24411 |
552M |
0 |