Query time 0.00426
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": 82,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (48813,45029,46155,47878,47614,48560,40524,48836,44758,49290,40713,45241,41440,3616,43477,2044,43856,47871,48551,49001,47615,47612,47870,48938,41431,35685,41434,41432,48939,2042,48550,321)"
}
},
{
"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 |
321 |
154M |
|
2042 |
154M |
|
2044 |
154M |
|
3616 |
154M |
|
35685 |
143M |
|
40524 |
155M |
|
40713 |
155M |
|
41431 |
210,154M |
|
41432 |
154M |
|
41434 |
210,154M |
|
41440 |
154M |
|
43477 |
151M |
|
43856 |
156M |
|
44758 |
209,141M |
|
45029 |
154M |
|
45241 |
154M |
|
46155 |
317,316M |
|
47612 |
212,210,166M |
|
47614 |
212,210,166M |
|
47615 |
212,210,166M |
|
47870 |
110,320,190,210,211,412,319M |
|
47871 |
110,104,190,320,210,211,412,319M |
|
47878 |
104,110,210,211,319,412,320M |
|
48550 |
210,146M |
|
48551 |
210,146M |
|
48560 |
315,210,168,142M |
|
48813 |
166,212,195M |
|
48836 |
412M |
|
48938 |
209,110,201,202M |
|
48939 |
209,110,201,105M |
|
49001 |
197,412M |
|
49290 |
412,315,213,96M |
|