Query time 0.01196
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 (50216,41341,41340,47922,47921,41343,47896,47924,47923,41339,31965,1972,36746,2085,2304,5829,41399,15218,3765,3004,2302,22143,18160,4599,2299,47895,3641,2298,3767,5826,4597,2297)"
}
},
{
"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 |
1972 |
210,213,412,169M |
|
2085 |
110,107,105,191M |
|
2297 |
169M |
|
2298 |
412,169M |
|
2299 |
169M |
|
2302 |
169M |
|
2304 |
210,412,169M |
|
3004 |
166M |
|
3641 |
169,412,210M |
|
3765 |
211,215M |
|
3767 |
211,215M |
|
4597 |
211,215M |
|
4599 |
211,215M |
|
5826 |
412,169M |
|
5829 |
169,412,210M |
|
15218 |
169,412M |
|
18160 |
211,215M |
|
22143 |
213,210,169M |
|
31965 |
210,213,169M |
|
36746 |
409,340M |
|
41339 |
191M |
|
41340 |
191M |
|
41341 |
191M |
|
41343 |
191M |
|
41399 |
144M |
|
47895 |
213,166,212,110,191M |
|
47896 |
212,213,166,110,191M |
|
47921 |
212,213,166,110,191M |
|
47922 |
213,212,166,110,191M |
|
47923 |
213,212,166,110,191M |
|
47924 |
213,212,191,110,166M |
|
50216 |
409,166,165M |
|