Query time 0.00864
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": 55,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1061,38129,41407,1174,1062,5578,5759,1745,3639,5636,2295,5579,23481,6660,16847,49018,5478,3768,48847,2083,5405,4595,5580,3989,1768,40309,4597,47652,2086,5770,41418,798)"
}
},
{
"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 |
798 |
143M |
|
1061 |
213,197M |
|
1062 |
209,210,197M |
|
1174 |
190M |
|
1745 |
183M |
|
1768 |
319,412,320M |
|
2083 |
211,215M |
|
2086 |
155M |
|
2295 |
210,213,412,169M |
|
3639 |
169,412,210M |
|
3768 |
211,215M |
|
3989 |
157M |
|
4595 |
211,215M |
|
4597 |
211,215M |
|
5405 |
157M |
|
5478 |
191M |
|
5578 |
191M |
|
5579 |
191M |
|
5580 |
191M |
|
5636 |
154M |
|
5759 |
184M |
|
5770 |
184M |
|
6660 |
318M |
|
16847 |
157M |
|
23481 |
209,160M |
|
38129 |
155M |
|
40309 |
124M |
|
41407 |
143M |
|
41418 |
141M |
|
47652 |
315,110,119,412,213M |
|
48847 |
209,153M |
|
49018 |
169,409,412M |
|