Query time 0.00935
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": 48,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (38553,1851,2148,43851,41409,41424,5485,1852,44923,43651,1769,719,5764,40753,41417,35691,41427,5760,31950,3978,41011,5412,5773,41322,41414,47253,41598,41413,41408,1049,17875,4903)"
}
},
{
"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 |
719 |
156M |
|
1049 |
156,159M |
|
1769 |
412,320M |
|
1851 |
210,146M |
|
1852 |
210,146M |
|
2148 |
210,146M |
|
3978 |
160M |
|
4903 |
151M |
|
5412 |
157M |
|
5485 |
191M |
|
5760 |
184M |
|
5764 |
210,209,315,184M |
|
5773 |
184M |
|
17875 |
151M |
|
31950 |
156,155M |
|
35691 |
143M |
|
38553 |
159,160M |
|
40753 |
183M |
|
41011 |
144M |
|
41322 |
157M |
|
41408 |
143M |
|
41409 |
143M |
|
41413 |
143M |
|
41414 |
143M |
|
41417 |
141M |
|
41424 |
318M |
|
41427 |
210,213,318M |
|
41598 |
156M |
|
43651 |
409,160M |
|
43851 |
174,412,210M |
|
44923 |
212M |
|
47253 |
151M |
|