Query time 0.01318
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": 59,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (26881,47011,26879,5547,26884,26883,5832,43823,34676,40439,47601,1586,34673,1718,46993,21780,47013,31629,1714,2921,37314,5781,41205,5548,40434,460,3587,5549,46737,34671,2922,47658)"
}
},
{
"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 |
460 |
315,201M |
|
1586 |
111M |
|
1714 |
123M |
|
1718 |
340M |
|
2921 |
158M |
|
2922 |
313M |
|
3587 |
340M |
|
5547 |
123M |
|
5548 |
123M |
|
5549 |
123M |
|
5781 |
213,114M |
|
5832 |
121M |
|
21780 |
120M |
|
26879 |
169M |
|
26881 |
169M |
|
26883 |
213,315,210,169M |
|
26884 |
169M |
|
31629 |
122M |
|
34671 |
122M |
|
34673 |
122M |
|
34676 |
122M |
|
37314 |
313,340M |
|
40434 |
210,209,409,149M |
|
40439 |
409,149M |
|
41205 |
107,202,201M |
|
43823 |
122M |
|
46737 |
123M |
|
46993 |
209,210,213,169M |
|
47011 |
210,141M |
|
47013 |
210,212,141M |
|
47601 |
212,210,166M |
|
47658 |
412,119M |
|