Query time 0.00366
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": 48,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (3196,33703,37282,40759,33701,37885,2151,6045,40811,5642,2472,47604,6363,15613,2473,3991,3465,5643,4823,37295,5772,2565,37298,1850,2155,47592,2626,26862,41130,37280,21746,37881)"
}
},
{
"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 |
1850 |
146M |
|
2151 |
160M |
|
2155 |
160M |
|
2472 |
163M |
|
2473 |
163M |
|
2565 |
121M |
|
2626 |
146,318M |
|
3196 |
169M |
|
3465 |
184,165,168M |
|
3991 |
157M |
|
4823 |
317M |
|
5642 |
175M |
|
5643 |
175M |
|
5772 |
184M |
|
6045 |
163M |
|
6363 |
169,213,412,210,119M |
|
15613 |
146,318M |
|
21746 |
156M |
|
26862 |
117M |
|
33701 |
210,145M |
|
33703 |
145M |
|
37280 |
145M |
|
37282 |
145M |
|
37295 |
145M |
|
37298 |
145M |
|
37881 |
318M |
|
37885 |
318M |
|
40759 |
118M |
|
40811 |
126M |
|
41130 |
318M |
|
47592 |
212,210,409,166M |
|
47604 |
210,212,166M |
|