Query time 0.00786
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": 44,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (3470,1710,5568,2237,6533,3469,46739,46734,16601,1781,6466,2138,35734,48843,1755,16612,1754,2131,6468,6529,2130,40455,27350,6534,2137,6535,5815,21600,2129,1712,1750,48844)"
}
},
{
"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 |
1710 |
123M |
|
1712 |
123M |
|
1750 |
183M |
|
1754 |
183M |
|
1755 |
183M |
|
1781 |
313M |
|
2129 |
123M |
|
2130 |
123M |
|
2131 |
120M |
|
2137 |
120M |
|
2138 |
120M |
|
2237 |
123M |
|
3469 |
123M |
|
3470 |
123M |
|
5568 |
123M |
|
5815 |
412,119M |
|
6466 |
122M |
|
6468 |
122M |
|
6529 |
95,119,118M |
|
6533 |
118M |
|
6534 |
118M |
|
6535 |
118M |
|
16601 |
123M |
|
16612 |
123M |
|
21600 |
120M |
|
27350 |
123M |
|
35734 |
168,142M |
|
40455 |
315,209,409,153M |
|
46734 |
123M |
|
46739 |
123M |
|
48843 |
209,409,153M |
|
48844 |
209,153M |
|