Query time 0.00620
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": 109,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1896,50216,40451,49588,2320,2319,35256,47632,45283,46822,6659,50182,48823,46585,15457,40927,49012,47903,43817,1894,49873,6358,6357,41341,35279,47597,1767,18608,1057,5790,17265,41340)"
}
},
{
"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 |
1057 |
210,209,409,160M |
|
1767 |
212,315,409,196M |
|
1894 |
409,196M |
|
1896 |
409,196M |
|
2319 |
409,152M |
|
2320 |
409,152M |
|
5790 |
213,210,119,412,114M |
|
6357 |
122,117,412M |
|
6358 |
412,119M |
|
6659 |
409,166M |
|
15457 |
174,412,210M |
|
17265 |
412,122M |
|
18608 |
110,163,166,318M |
|
35256 |
210,209,409,154M |
|
35279 |
340,409 |
|
40451 |
210,209,409,149M |
|
40927 |
210,412,169M |
|
41340 |
191M |
|
41341 |
191M |
|
43817 |
412,409,315,212M |
|
45283 |
209,210,409,154M |
|
46585 |
210,412,169M |
|
46822 |
409,160M |
|
47597 |
210,212,409,166M |
|
47632 |
409,210,212,166M |
|
47903 |
110,213,315,119,412,214M |
|
48823 |
550,409,210,209,183M |
|
49012 |
412M |
|
49588 |
409,110,209,153M |
|
49873 |
409,184M |
|
50182 |
409,166M |
|
50216 |
409,166,165M |
|