Query time 0.00145
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": 24,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1209,1186,114,1810,113,1742,1598,1565,1597,1708,1694,1732,1596,1632,79,297,1852,1456,653,1465,1494,1620,1619,1457)"
},
"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 |
79 |
25M |
|
113 |
25M |
|
114 |
25M |
|
297 |
12M |
|
653 |
25M |
|
1186 |
35M |
|
1209 |
35M |
|
1456 |
35M |
|
1457 |
35M |
|
1465 |
25M |
|
1494 |
25M |
|
1565 |
13M |
|
1596 |
13M |
|
1597 |
13M |
|
1598 |
13M |
|
1619 |
25M |
|
1620 |
25M |
|
1632 |
13M |
|
1694 |
13M |
|
1708 |
13M |
|
1732 |
13M |
|
1742 |
13M |
|
1810 |
25M |
|
1852 |
35M |
|