Query time 0.00443
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": 35,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (44385,44404,44416,44389,35212,44392,44407,44403,45589,44399,27293,44400,44386,44410,33746,44388,44408,44405,44390,44396,44412,44414,44415,44402,47262,47267,47825,46582,46725,44517,47263,47266)"
}
},
{
"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 |
27293 |
175M |
|
33746 |
174M |
|
35212 |
174M |
|
44385 |
174M |
|
44386 |
174M |
|
44388 |
172M |
|
44389 |
174M |
|
44390 |
174M |
|
44392 |
174M |
|
44396 |
174M |
|
44399 |
174M |
|
44400 |
172M |
|
44402 |
172M |
|
44403 |
172M |
|
44404 |
172M |
|
44405 |
172M |
|
44407 |
172M |
|
44408 |
174M |
|
44410 |
174M |
|
44412 |
174M |
|
44414 |
174M |
|
44415 |
174M |
|
44416 |
174M |
|
44517 |
175,193M |
|
45589 |
174M |
|
46582 |
174M |
|
46725 |
174M |
|
47262 |
172M |
|
47263 |
172M |
|
47266 |
172M |
|
47267 |
172M |
|
47825 |
210,110,175M |
|