Query time 0.00219
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": 44,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (32305,43852,4861,37303,37288,38102,2476,40507,1851,4859,2148,1840,987,37954,41355,4870,37287,36496,41424,1852,31644,1472,40893,27054,41360,44923,32110,46587,932,2251,41357,37545)"
}
},
{
"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 |
932 |
173M |
|
987 |
143M |
|
1472 |
155,156M |
|
1840 |
146,318M |
|
1851 |
210,146M |
|
1852 |
210,146M |
|
2148 |
210,146M |
|
2251 |
160M |
|
2476 |
181M |
|
4859 |
175M |
|
4861 |
210,175M |
|
4870 |
210,175M |
|
27054 |
117M |
|
31644 |
117M |
|
32110 |
214,117M |
|
32305 |
166,313M |
|
36496 |
318M |
|
37287 |
145M |
|
37288 |
145M |
|
37303 |
145M |
|
37545 |
163M |
|
37954 |
214M |
|
38102 |
145M |
|
40507 |
122M |
|
40893 |
124M |
|
41355 |
145M |
|
41357 |
145M |
|
41360 |
145M |
|
41424 |
318M |
|
43852 |
174,412,210M |
|
44923 |
212M |
|
46587 |
173M |
|