Query time 0.00436
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": 50,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (5833,5835,27363,3885,5836,37305,2566,38146,38145,31652,6529,3601,3617,31651,31786,534,46716,286,25180,26846,1041,2567,1835,46749,729,227,33697,1532,1838,1056,5730,47904)"
}
},
{
"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 |
227 |
181M |
|
286 |
146M |
|
534 |
166,212M |
|
729 |
156M |
|
1041 |
156,159M |
|
1056 |
210,209,409,160M |
|
1532 |
118M |
|
1835 |
160M |
|
1838 |
317M |
|
2566 |
121M |
|
2567 |
121M |
|
3601 |
146M |
|
3617 |
168M |
|
3885 |
317M |
|
5730 |
158M |
|
5833 |
121M |
|
5835 |
121M |
|
5836 |
121M |
|
6529 |
95,119,118M |
|
25180 |
166,212M |
|
26846 |
117M |
|
27363 |
409,165M |
|
31651 |
124M |
|
31652 |
180M |
|
31786 |
409,169M |
|
33697 |
145M |
|
37305 |
145M |
|
38145 |
146M |
|
38146 |
210,146M |
|
46716 |
99,151,193M |
|
46749 |
154M |
|
47904 |
110,315,213,214,412,119M |
|