Query time 0.00438
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": 67,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (47613,3288,28159,3287,3286,3872,1401,3021,6093,4367,5455,36781,2280,3402,1285,2870,36834,5461,5958,5476,1205,5959,5457,5472,5462,2868,31734,5960,5957,5961,5467,35733)"
}
},
{
"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 |
1205 |
165M |
|
1285 |
165M |
|
1401 |
315,340,313M |
|
2280 |
166M |
|
2868 |
340,313M |
|
2870 |
340,313M |
|
3021 |
340,313M |
|
3286 |
315,412,118,119M |
|
3287 |
315,412,118,119M |
|
3288 |
315,412,118,119M |
|
3402 |
340,313M |
|
3872 |
313,166M |
|
4367 |
191M |
|
5455 |
191M |
|
5457 |
191M |
|
5461 |
191M |
|
5462 |
191M |
|
5467 |
191M |
|
5472 |
191M |
|
5476 |
191M |
|
5957 |
191M |
|
5958 |
191M |
|
5959 |
191M |
|
5960 |
191M |
|
5961 |
191M |
|
6093 |
315,412,118M |
|
28159 |
412,119M |
|
31734 |
165M |
|
35733 |
313,191M |
|
36781 |
318M |
|
36834 |
163,318M |
|
47613 |
210,212,166M |
|