Query time 0.00229
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": 35,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (26863,43796,4237,43798,5270,5257,6070,37849,335,5726,5288,40809,5228,18194,5265,40754,4279,40807,926,1266,26851,32360,1542,6103,26857,37942,2449,31904,31618,6102,31646,35735)"
}
},
{
"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 |
335 |
174M |
|
926 |
182M |
|
1266 |
172M |
|
1542 |
173M |
|
2449 |
181M |
|
4237 |
199M |
|
4279 |
184M |
|
5228 |
174M |
|
5257 |
122M |
|
5265 |
122M |
|
5270 |
122M |
|
5288 |
122M |
|
5726 |
157M |
|
6070 |
175,193M |
|
6102 |
121M |
|
6103 |
121M |
|
18194 |
122M |
|
26851 |
117M |
|
26857 |
117M |
|
26863 |
117M |
|
31618 |
173M |
|
31646 |
117M |
|
31904 |
122M |
|
32360 |
166,313M |
|
35735 |
168M |
|
37849 |
313M |
|
37942 |
173M |
|
40754 |
409,183M |
|
40807 |
124M |
|
40809 |
214M |
|
43796 |
122M |
|
43798 |
122M |
|