Query time 0.00081
JSON explain
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "netting_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": "netting_products_categories.product_id in (531,570,592,569,707,757,761,834)"
}
},
{
"table": {
"table_name": "netting_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["pucuda_cscart.netting_products_categories.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "netting_categories.storefront_id in (0,1) and (netting_categories.usergroup_ids = '' or find_in_set(0,netting_categories.usergroup_ids) or find_in_set(1,netting_categories.usergroup_ids)) and netting_categories.`status` in ('A','H')"
}
},
{
"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", "pucuda_cscart.netting_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
Result
product_id |
category_ids |
position |
531 |
318,378,366,362M |
0 |
569 |
318,378,366,362M |
0 |
570 |
318,378,366,362M |
0 |
592 |
318,378,366,362M |
0 |
707 |
322,318,315M |
0 |
757 |
318,322,315M |
0 |
761 |
318,322,315M |
0 |
834 |
318,378,310,466M |
0 |