Query time 0.00154
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 32,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (41,332,330,333,329,327,504,1008,758,1817,1819,1172,1196,1908,1809,1405,1851,730,1481,382,453,425,360,1479,1478,414,1866,788,1084,1903,538,759)"
},
"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", "bacpvdev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
},
"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": ["bacpvdev_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')"
}
}
}
Result
product_id |
category_ids |
position |
41 |
17M |
0 |
327 |
17M |
0 |
329 |
17M |
0 |
330 |
17M |
0 |
332 |
17M |
0 |
333 |
17M |
0 |
360 |
17M |
0 |
382 |
17M |
0 |
414 |
17M |
0 |
425 |
17M |
0 |
453 |
17M |
0 |
504 |
17M |
0 |
538 |
17M |
0 |
730 |
17M |
0 |
758 |
17M |
0 |
759 |
17M |
0 |
788 |
17M |
0 |
1008 |
17M |
0 |
1084 |
17M |
0 |
1172 |
17M |
0 |
1196 |
17M |
0 |
1405 |
17M |
0 |
1478 |
17M |
0 |
1479 |
17M |
0 |
1481 |
17M |
0 |
1809 |
17M |
0 |
1817 |
17M |
0 |
1819 |
17M |
0 |
1851 |
17M |
0 |
1866 |
17M |
0 |
1903 |
17M |
0 |
1908 |
17M |
0 |