Query time 0.01020
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": 97,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (49012,6370,3288,49164,47903,49230,28159,43817,48846,1894,23152,47631,1533,6372,49873,6358,6357,41345,41341,35279,25318,47597,47084,5787,1767,3866,5503,18608,2140,2139,5987,42255)"
}
},
{
"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": ["dev_db.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", "dev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
Result
product_id |
category_ids |
position |
1533 |
118M |
|
1767 |
212,315,409,196M |
|
1894 |
409,196M |
|
2139 |
116M |
|
2140 |
111M |
|
3288 |
315,412,118,119M |
|
3866 |
313,166M |
|
5503 |
121M |
|
5787 |
213,210,412,114M |
|
5987 |
116M |
|
6357 |
122,117,412M |
|
6358 |
412,119M |
|
6370 |
117,412,119M |
|
6372 |
117,169,412M |
|
18608 |
110,163,166,318M |
|
23152 |
409,340M |
|
25318 |
101,166,213,195,409,193M |
|
28159 |
412,119M |
|
35279 |
340,409 |
|
41341 |
191M |
|
41345 |
119,118M |
|
42255 |
409,169M |
|
43817 |
412,409,315,212M |
|
47084 |
110,409,149M |
|
47597 |
210,212,409,166M |
|
47631 |
210,212,409,166M |
|
47903 |
110,213,315,119,412,214M |
|
48846 |
209,409,153M |
|
49012 |
412M |
|
49164 |
412,550,110,315,197M |
|
49230 |
412,166,313M |
|
49873 |
409,184M |
|