Query time 0.00866
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": 33,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (21063,1056,1711,40811,5772,14982,4939,1748,5758,40802,5757,43827,47564,49287,49289,48472,48475)"
}
},
{
"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 |
1056 |
210,209,409,160M |
|
1711 |
123M |
|
1748 |
183M |
|
4939 |
316,317M |
|
5757 |
184M |
|
5758 |
184M |
|
5772 |
184M |
|
14982 |
117M |
|
21063 |
120M |
|
40802 |
114M |
|
40811 |
126M |
|
43827 |
123M |
|
47564 |
120M |
|
48472 |
123M |
|
48475 |
123M |
|
49287 |
315,120,96M |
|
49289 |
213,315,120,96M |
|