Query time 0.00230
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": 47,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (36300,33824,288,25159,40527,41230,43649,47261,36270,31884,3979,49309,40162,45281,44575,36293,18710,48801,48804,31878,31740,33713,3976,5565,5731,45256,44881,469,36472,40913,3984,38128)"
}
},
{
"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 |
|
469 |
157M |
|
3976 |
161M |
|
3979 |
160M |
|
3984 |
157M |
|
5565 |
155M |
|
5731 |
155M |
|
18710 |
160M |
|
25159 |
160M |
|
31740 |
155M |
|
31878 |
156,155M |
|
31884 |
159M |
|
33713 |
160M |
|
33824 |
160M |
|
36270 |
158M |
|
36293 |
210,160M |
|
36300 |
210,160M |
|
36472 |
209,160M |
|
38128 |
155M |
|
40162 |
155M |
|
40527 |
160M |
|
40913 |
155M |
|
41230 |
160M |
|
43649 |
210,409,154M |
|
44575 |
210,155M |
|
44881 |
211,319,156M |
|
45256 |
211,319,156M |
|
45281 |
409,154M |
|
47261 |
157M |
|
48801 |
210,155M |
|
48804 |
210,155M |
|
49309 |
160M |
|