Query time 0.01560
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": 40,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (36474,4237,43798,5270,5257,6070,37849,335,5726,41437,5288,40809,5228,37881,18194,37300,4795,5265,40309,6371,38150,40754,4279,47652,37296,5770,26849,31734,27056,37294,40807,41358)"
}
},
{
"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 |
|
4237 |
199M |
|
4279 |
184M |
|
4795 |
318M |
|
5228 |
174M |
|
5257 |
122M |
|
5265 |
122M |
|
5270 |
122M |
|
5288 |
122M |
|
5726 |
157M |
|
5770 |
184M |
|
6070 |
175,193M |
|
6371 |
174,412M |
|
18194 |
122M |
|
26849 |
117M |
|
27056 |
117M |
|
31734 |
165M |
|
36474 |
160M |
|
37294 |
145M |
|
37296 |
145M |
|
37300 |
145M |
|
37849 |
313M |
|
37881 |
318M |
|
38150 |
146M |
|
40309 |
124M |
|
40754 |
409,183M |
|
40807 |
124M |
|
40809 |
214M |
|
41358 |
145M |
|
41437 |
154M |
|
43798 |
122M |
|
47652 |
315,110,119,412,213M |
|