Query time 0.00370
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 (47599,21464,2015,1836,2255,3451,40526,6555,25180,286,4071,26604,3004,3765,2509,294,33718,2576,26608,5577,2414,2797,2492,2302,50233,47603,48844,38560,6607,1732,36834,2448)"
}
},
{
"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 |
286 |
146M |
|
294 |
149M |
|
1732 |
157M |
|
1836 |
157M |
|
2015 |
176M |
|
2255 |
154M |
|
2302 |
169M |
|
2414 |
121M |
|
2448 |
210,176M |
|
2492 |
169M |
|
2509 |
120M |
|
2576 |
169M |
|
2797 |
173M |
|
3004 |
166M |
|
3451 |
120M |
|
3765 |
211,215M |
|
4071 |
155M |
|
5577 |
191M |
|
6555 |
183M |
|
6607 |
174M |
|
21464 |
409,152M |
|
25180 |
166,212M |
|
26604 |
144M |
|
26608 |
144M |
|
33718 |
193,317M |
|
36834 |
163,318M |
|
38560 |
155M |
|
40526 |
159M |
|
47599 |
210,212,409,166M |
|
47603 |
210,212,166M |
|
48844 |
209,153M |
|
50233 |
550,409,155M |
|