Query time 0.01276
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 (41341,41340,47922,47921,41343,47896,47924,47923,41339,35829,2085,35792,637,31872,35855,33606,47895,47280,48032,48322,48033,48037,48031,48034,48036,48035,47095,48323,47096,48324,47092,47094)"
}
},
{
"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 |
637 |
213,191,409,193M |
0 |
2085 |
110,107,105,191M |
0 |
31872 |
191M |
0 |
33606 |
313,191M |
0 |
35792 |
313,191M |
0 |
35829 |
313,191M |
0 |
35855 |
313,191M |
0 |
41339 |
191M |
0 |
41340 |
191M |
0 |
41341 |
191M |
0 |
41343 |
191M |
0 |
47092 |
166,191M |
0 |
47094 |
166,191M |
0 |
47095 |
166,191M |
0 |
47096 |
166,191M |
0 |
47280 |
191,215,166M |
0 |
47895 |
213,166,212,110,191M |
0 |
47896 |
212,213,166,110,191M |
0 |
47921 |
212,213,166,110,191M |
0 |
47922 |
213,212,166,110,191M |
0 |
47923 |
213,212,166,110,191M |
0 |
47924 |
213,212,191,110,166M |
0 |
48031 |
191,213,110,211M |
0 |
48032 |
191,213,110,211M |
0 |
48033 |
191,213,110,211M |
0 |
48034 |
191,211,110,213M |
0 |
48035 |
213,191,211M |
0 |
48036 |
211,191,213M |
0 |
48037 |
211,191,213M |
0 |
48322 |
212,315,191M |
0 |
48323 |
212,315,191M |
0 |
48324 |
212,315,191M |
0 |