Query time 0.00734
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": 99,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (33725,43652,47613,3288,28159,6372,33723,3287,3286,3872,1278,855,854,35165,35176,35173,35170,35172,6092,35731,23261,46982,464,3021,35168,41429,6093,33724,856,460,34053,455)"
}
},
{
"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 |
455 |
201,202,212M |
|
460 |
315,201M |
|
464 |
201M |
|
854 |
168,142,209,210M |
|
855 |
142M |
|
856 |
315,317,209,142M |
|
1278 |
143M |
|
3021 |
340,313M |
|
3286 |
315,412,118,119M |
|
3287 |
315,412,118,119M |
|
3288 |
315,412,118,119M |
|
3872 |
313,166M |
|
6092 |
315,412,119M |
|
6093 |
315,412,118M |
|
6372 |
117,169,412M |
|
23261 |
313M |
|
28159 |
412,119M |
|
33723 |
209,409,160M |
|
33724 |
409,160M |
|
33725 |
209,409,160M |
|
34053 |
409,160M |
|
35165 |
210,144,412,143M |
|
35168 |
210,143,412,144M |
|
35170 |
143,412,144M |
|
35172 |
143,144M |
|
35173 |
143,144M |
|
35176 |
143,144M |
|
35731 |
313,191M |
|
41429 |
213,210,318M |
|
43652 |
409,152M |
|
46982 |
209,196M |
|
47613 |
210,212,166M |
|