Query time 0.00279
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 (33363,4281,38101,33709,41401,5792,35912,40532,1998,45021,764,2454,288,40527,49199,44933,5236,37413,41383,36765,36270,4288,32690,27290,37420,6439,6403,33360,44560,3614,4287,3979)"
}
},
{
"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 |
288 |
157M |
|
764 |
143M |
|
1998 |
176M |
|
2454 |
169M |
|
3614 |
144M |
|
3979 |
160M |
|
4281 |
143M |
|
4287 |
143M |
|
4288 |
143M |
|
5236 |
169M |
|
5792 |
157M |
|
6403 |
215,211M |
|
6439 |
144M |
|
27290 |
175M |
|
32690 |
144M |
|
33360 |
169M |
|
33363 |
169M |
|
33709 |
160M |
|
35912 |
142M |
|
36270 |
158M |
|
36765 |
169M |
|
37413 |
166M |
|
37420 |
166M |
|
38101 |
145M |
|
40527 |
160M |
|
40532 |
160M |
|
41383 |
143M |
|
41401 |
143M |
|
44560 |
152M |
|
44933 |
144M |
|
45021 |
199M |
|
49199 |
412,169M |
|