Query time 0.00514
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": 79,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (40437,40451,49487,49539,47084,40442,40446,40443,40449,40448,40447,40444,40436,40450,40438,40441,40439,40434,40440,634,48826,294,48772,39612,36304,635,636,48827,31953)"
}
},
{
"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 |
294 |
149M |
0 |
634 |
149M |
0 |
635 |
149M |
0 |
636 |
409,149M |
0 |
31953 |
149M |
0 |
36304 |
149,210M |
0 |
39612 |
212,210,209,409,149M |
0 |
40434 |
210,209,409,149M |
0 |
40436 |
409,149M |
0 |
40437 |
409,149M |
0 |
40438 |
409,149M |
0 |
40439 |
409,149M |
0 |
40440 |
409,149M |
0 |
40441 |
409,149M |
0 |
40442 |
409,149M |
0 |
40443 |
409,149M |
0 |
40444 |
409,149M |
0 |
40446 |
409,149M |
0 |
40447 |
110,409,149M |
0 |
40448 |
409,149M |
0 |
40449 |
209,409,149M |
0 |
40450 |
209,409,149M |
0 |
40451 |
210,209,409,149M |
0 |
47084 |
110,409,149M |
0 |
48772 |
149,409,99M |
0 |
48826 |
210,149M |
0 |
48827 |
210,149M |
0 |
49487 |
409,149,210,209,412,110M |
0 |
49539 |
210,209,110,409,149M |
0 |