Query time 0.00448
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": 68,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (3751,3758,3759,3762,47563,3748,4042,4596,4656,4646,3766,4623,3761,4039,3763,6513,6260,4598,4640,46714,4632,47280,6403,6259,48062,6258,4603,6257,47197,47855,47367,4635)"
}
},
{
"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 |
3748 |
211,215M |
|
3751 |
215M |
|
3758 |
211,215M |
|
3759 |
211,215M |
|
3761 |
211,215M |
|
3762 |
211,215M |
|
3763 |
211,215M |
|
3766 |
211,215M |
|
4039 |
211,215M |
|
4042 |
215,211M |
|
4596 |
215,211M |
|
4598 |
211,215M |
|
4603 |
215,211M |
|
4623 |
211,215M |
|
4632 |
211,215M |
|
4635 |
211,215M |
|
4640 |
211,215M |
|
4646 |
211,215M |
|
4656 |
211,215M |
|
6257 |
215,211M |
|
6258 |
211,215M |
|
6259 |
215,211M |
|
6260 |
211,215M |
|
6403 |
215,211M |
|
6513 |
211,215M |
|
46714 |
201M |
|
47197 |
211,201M |
|
47280 |
191,215,166M |
|
47367 |
211,213,201M |
|
47563 |
212,202M |
|
47855 |
213,110,201M |
|
48062 |
212,315,201M |
|