Query time 0.00078
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": 28,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (12578,12559,12551,12634,12636,12635,12554,12552,12652,12653,12654,12646,12655,12656)"
},
"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",
"noframes_angrybeaver.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": ["noframes_angrybeaver.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 |
| 12551 |
267,270,268M |
0 |
| 12552 |
267,270,268M |
0 |
| 12554 |
267,270,268M |
0 |
| 12559 |
278,268,267M |
0 |
| 12578 |
278,268,267M |
0 |
| 12634 |
267,270,268M |
0 |
| 12635 |
267,268,270M |
0 |
| 12636 |
268,267,270M |
0 |
| 12646 |
268,270,267M |
0 |
| 12652 |
270,268,267M |
0 |
| 12653 |
268,270,267M |
0 |
| 12654 |
268,267,270M |
0 |
| 12655 |
270,268,267M |
0 |
| 12656 |
270,268,267M |
0 |