Query time 0.00055
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": 19,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (6676,6694,6702,6682,6738,6698,6750,6741,6678,6756,6690,6686,6706,6753,6744,6747)"
},
"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", "rfswire_cart.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": ["rfswire_cart.cscart_products_categories.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "cscart_categories.company_id = 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 |
| 6676 |
3723,3722,3721,3720,3719M |
10 |
| 6678 |
3720M |
0 |
| 6682 |
3720M |
0 |
| 6686 |
3720M |
0 |
| 6690 |
3720M |
0 |
| 6694 |
3720M |
0 |
| 6698 |
3720M |
0 |
| 6702 |
3720M |
0 |
| 6706 |
3720M |
0 |
| 6738 |
3720M |
0 |
| 6741 |
3720M |
0 |
| 6744 |
3720M |
0 |
| 6747 |
3720M |
0 |
| 6750 |
3720M |
0 |
| 6753 |
3720M |
0 |
| 6756 |
3720M |
0 |