Query time 0.00161
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": 30,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1288,1289,1767,1347,665,581,299,301,1799,1462,1549,1521,1519,1517,1522,1523,1518,1516,1520,30,31,1545,1483,409,550,840,197,68,1180,1205)"
},
"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 |
30 |
8M |
|
31 |
8M |
|
68 |
22M |
|
197 |
20M |
|
299 |
8M |
|
301 |
8M |
|
409 |
36M |
|
550 |
36M |
|
581 |
8M |
|
665 |
8M |
|
840 |
36M |
|
1180 |
8M |
|
1205 |
8M |
|
1288 |
43M |
|
1289 |
43M |
|
1347 |
8M |
|
1462 |
8M |
|
1483 |
36M |
|
1516 |
8M |
|
1517 |
8M |
|
1518 |
8M |
|
1519 |
8M |
|
1520 |
8M |
|
1521 |
8M |
|
1522 |
8M |
|
1523 |
8M |
|
1545 |
8M |
|
1549 |
8M |
|
1767 |
21M |
|
1799 |
8M |
|