Query time 0.00098
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": 35,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (20665,24347,20664,24348,20889,24349,24350,20891,22003,22004,22005,22006,22007,22008,22009,22010,22011,22012,22371,22378,22372,22379,22373,22385)"
}
},
{
"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 |
| 20664 |
1036M |
|
| 20665 |
1036M |
|
| 20889 |
1036M |
|
| 20891 |
1036M |
|
| 22003 |
1036M |
|
| 22004 |
1036M |
|
| 22005 |
1036M |
|
| 22006 |
1036M |
|
| 22007 |
1036M |
|
| 22008 |
1036M |
|
| 22009 |
1036M |
|
| 22010 |
1036M |
|
| 22011 |
1036M |
|
| 22012 |
1036M |
|
| 22371 |
1036M |
|
| 22372 |
1036M |
|
| 22373 |
1036M |
|
| 22378 |
1036M |
|
| 22379 |
1036M |
|
| 22385 |
1036M |
|
| 24347 |
1036M |
|
| 24348 |
1036M |
|
| 24349 |
1036M |
|
| 24350 |
1036M |
|