Query time 0.01062
JSON explain
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 34,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (951,41016,16528,41384,4294,987,3722,42180,41409,4290,42161,35691,4284,41414,41413,42184,4296,956,988,41408,32683,793,4293,4291,41015,5595,42188,41020,41415,4281,41412,41401)"
}
},
{
"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": ["dev_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')"
}
},
{
"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", "dev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
Result
product_id |
category_ids |
position |
793 |
210,143M |
0 |
951 |
143M |
0 |
956 |
143M |
0 |
987 |
143M |
0 |
988 |
144,143M |
0 |
3722 |
143M |
0 |
4281 |
143M |
0 |
4284 |
143M |
0 |
4290 |
143M |
0 |
4291 |
143M |
0 |
4293 |
143M |
0 |
4294 |
143M |
0 |
4296 |
143M |
0 |
5595 |
143M |
0 |
16528 |
143M |
0 |
32683 |
143M |
0 |
35691 |
143M |
0 |
41015 |
143M |
0 |
41016 |
143M |
0 |
41020 |
143M |
0 |
41384 |
143M |
0 |
41401 |
143M |
0 |
41408 |
143M |
0 |
41409 |
143M |
0 |
41412 |
143M |
0 |
41413 |
143M |
0 |
41414 |
143M |
0 |
41415 |
143M |
0 |
42161 |
143M |
0 |
42180 |
143M |
0 |
42184 |
143M |
0 |
42188 |
143M |
0 |