Query time 0.00164
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": 29,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1285,1283,1284,1282,1885,1628,1625,1783,1779,1782,1781,1827,1454,1476,1473,1066,1399,1387,1054,1369,1370,1290,1291,1292,1784,1286,1287,1288,1289)"
},
"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 |
1054 |
43M |
0 |
1066 |
43M |
0 |
1282 |
43M |
0 |
1283 |
43M |
0 |
1284 |
43M |
0 |
1285 |
43M |
0 |
1286 |
43M |
0 |
1287 |
43M |
0 |
1288 |
43M |
0 |
1289 |
43M |
0 |
1290 |
43M |
0 |
1291 |
43M |
0 |
1292 |
43M |
0 |
1369 |
43M |
0 |
1370 |
43M |
0 |
1387 |
43M |
0 |
1399 |
43M |
0 |
1454 |
43M |
0 |
1473 |
43M |
0 |
1476 |
43M |
0 |
1625 |
43M |
0 |
1628 |
43M |
0 |
1779 |
43M |
0 |
1781 |
43M |
0 |
1782 |
43M |
0 |
1783 |
43M |
0 |
1784 |
43M |
0 |
1827 |
43M |
0 |
1885 |
43M |
0 |