Query time 0.00301
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": 52,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (5770,461,40807,1742,5763,4268,4267,48845,5758,47274,5775,40802,1752,40893,41616,5764,5771,5760,5773,1758,5757,41226,5768,40810,1744,33721,4303,5766,1743,1753,35475,48851)"
}
},
{
"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 |
|
1742 |
183M |
|
1743 |
183M |
|
1744 |
183M |
|
1752 |
183M |
|
1753 |
183M |
|
1758 |
182M |
|
4267 |
209,316M |
|
4268 |
209,316M |
|
4303 |
316,317M |
|
5757 |
184M |
|
5758 |
184M |
|
5760 |
184M |
|
5763 |
184M |
|
5764 |
210,209,315,184M |
|
5766 |
184M |
|
5768 |
315,213,210,184M |
|
5770 |
184M |
|
5771 |
184M |
|
5773 |
184M |
|
5775 |
315,184M |
|
33721 |
160M |
|
35475 |
142M |
|
40802 |
114M |
|
40807 |
124M |
|
40810 |
124M |
|
40893 |
124M |
|
41226 |
120M |
|
41616 |
120M |
|
47274 |
210,209,409,99M |
|
48845 |
209,153M |
|
48851 |
409,209,153M |
|