Query time 0.00654
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 (47655,27359,34555,31638,33312,31633,5300,5991,5297,1980,31634,31639,3570,3569,31636,1979,1088,17259,398,1981,31637,5278,31635,1580,48980,120,37850,1538,48558,15322,6274,40381)"
}
},
{
"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 |
120 |
122M |
|
398 |
123M |
|
1088 |
151M |
|
1538 |
117M |
|
1580 |
122M |
|
1979 |
122M |
|
1980 |
122M |
|
1981 |
122M |
|
3569 |
340M |
|
3570 |
340M |
|
5278 |
122M |
|
5297 |
122,412 |
|
5300 |
122,412 |
|
5991 |
121M |
|
6274 |
173M |
|
15322 |
173M |
|
17259 |
412,122M |
|
27359 |
409,165M |
|
31633 |
122M |
|
31634 |
122M |
|
31635 |
122M |
|
31636 |
122M |
|
31637 |
122M |
|
31638 |
122M |
|
31639 |
117M |
|
33312 |
119,412 |
|
34555 |
122M |
|
37850 |
340,313M |
|
40381 |
122M |
|
47655 |
412,110,315,119,210,209,213M |
|
48558 |
210,144M |
|
48980 |
550,155,210,110,100,161M |
|