Query time 0.00434
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": 58,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (3288,1533,41345,5544,3287,3286,65,5543,3289,6181,6093,6180,2183,5546,40761,2182,41170,6533,26927,6550,1786,5973,74,6124,6529,6534,26966,6535,26924,26968,6183,26920)"
}
},
{
"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 |
65 |
412,119,118M |
0 |
74 |
118M |
0 |
1533 |
118M |
0 |
1786 |
118M |
0 |
2182 |
118M |
0 |
2183 |
118M |
0 |
3286 |
315,412,118,119M |
0 |
3287 |
315,412,118,119M |
0 |
3288 |
315,412,118,119M |
0 |
3289 |
119,118M |
0 |
5543 |
118M |
0 |
5544 |
118M |
0 |
5546 |
118M |
0 |
5973 |
118M |
0 |
6093 |
315,412,118M |
0 |
6124 |
118M |
0 |
6180 |
118M |
0 |
6181 |
118M |
0 |
6183 |
118M |
0 |
6529 |
95,119,118M |
0 |
6533 |
118M |
0 |
6534 |
118M |
0 |
6535 |
118M |
0 |
6550 |
118M |
0 |
26920 |
118M |
0 |
26924 |
212,118M |
0 |
26927 |
118M |
0 |
26966 |
118M |
0 |
26968 |
118M |
0 |
40761 |
315,119,412,118M |
0 |
41170 |
118M |
0 |
41345 |
119,118M |
0 |