Query time 0.00719
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 (1533,5544,5543,6181,6180,2183,2182,6533,26927,5973,6124,6534,6535,26924,6183,26920,6536,6128,2181,29737,41774,6159,46143,26919,6172,41667,6125,26925,46141,6169,26928,3495)"
}
},
{
"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 |
1533 |
118M |
0 |
2181 |
118M |
0 |
2182 |
118M |
0 |
2183 |
118M |
0 |
3495 |
118,181M |
0 |
5543 |
118M |
0 |
5544 |
118M |
0 |
5973 |
118M |
0 |
6124 |
118M |
0 |
6125 |
118M |
0 |
6128 |
118M |
0 |
6159 |
118M |
0 |
6169 |
118M |
0 |
6172 |
118M |
0 |
6180 |
118M |
0 |
6181 |
118M |
0 |
6183 |
118M |
0 |
6533 |
118M |
0 |
6534 |
118M |
0 |
6535 |
118M |
0 |
6536 |
118M |
0 |
26919 |
118M |
0 |
26920 |
118M |
0 |
26924 |
212,118M |
0 |
26925 |
212,118M |
0 |
26927 |
118M |
0 |
26928 |
118M |
0 |
29737 |
118M |
0 |
41667 |
118M |
0 |
41774 |
118M |
0 |
46141 |
118M |
0 |
46143 |
118M |
0 |