Query time 0.00823
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": 67,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (47592,5478,6371,47652,1751,461,5960,5957,34548,5999,5961,4363,5956,4361,5451,46696,5479,4366,4360,1752,5485,47610,41410,41010,5963,41411,5447,4365,47605,48279,47606,5469)"
}
},
{
"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 |
461 |
201,212M |
|
1751 |
183M |
|
1752 |
183M |
|
4360 |
191M |
|
4361 |
191M |
|
4363 |
191M |
|
4365 |
191M |
|
4366 |
191M |
|
5447 |
191M |
|
5451 |
191M |
|
5469 |
191M |
|
5478 |
191M |
|
5479 |
191M |
|
5485 |
191M |
|
5956 |
191M |
|
5957 |
191M |
|
5960 |
191M |
|
5961 |
191M |
|
5963 |
191M |
|
5999 |
409,166M |
|
6371 |
174,412M |
|
34548 |
119,412,213M |
|
41010 |
166,194M |
|
41410 |
209,150M |
|
41411 |
150,209M |
|
46696 |
210,213,409,166M |
|
47592 |
212,210,409,166M |
|
47605 |
212,210,166M |
|
47606 |
212,210,166M |
|
47610 |
210,212,409,166M |
|
47652 |
315,110,119,412,213M |
|
48279 |
168,184M |
|